Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions openviking/storage/vectordb_adapters/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ def query(
limit: int = 10,
offset: int = 0,
output_fields: Optional[list[str]] = None,
with_vector: bool = False,
order_by: Optional[str] = None,
order_desc: bool = False,
) -> list[Dict[str, Any]]:
Expand Down Expand Up @@ -367,9 +366,6 @@ def query(
record["id"] = item.id
record["_score"] = item.score if item.score is not None else 0.0
record = self._normalize_record_for_read(record)
if not with_vector:
record.pop("vector", None)
record.pop("sparse_vector", None)
records.append(record)
return records

Expand All @@ -383,7 +379,7 @@ def delete(
coll = self.get_collection()
delete_ids = list(ids or [])
if not delete_ids and filter is not None:
matched = self.query(filter=filter, limit=limit, with_vector=True)
matched = self.query(filter=filter, limit=limit)
delete_ids = [record["id"] for record in matched if record.get("id")]

if not delete_ids:
Expand Down
4 changes: 0 additions & 4 deletions openviking/storage/viking_vector_index_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ async def query(
limit: int = 10,
offset: int = 0,
output_fields: Optional[List[str]] = None,
with_vector: bool = False,
order_by: Optional[str] = None,
order_desc: bool = False,
) -> List[Dict[str, Any]]:
Expand All @@ -212,7 +211,6 @@ async def query(
limit=limit,
offset=offset,
output_fields=output_fields,
with_vector=with_vector,
order_by=order_by,
order_desc=order_desc,
)
Expand All @@ -228,7 +226,6 @@ async def search(
limit: int = 10,
offset: int = 0,
output_fields: Optional[List[str]] = None,
with_vector: bool = False,
) -> List[Dict[str, Any]]:
# Backward-compatible alias for internal call sites.
return await self.query(
Expand All @@ -238,7 +235,6 @@ async def search(
limit=limit,
offset=offset,
output_fields=output_fields,
with_vector=with_vector,
)

async def filter(
Expand Down
Loading