Skip to content

Commit

Permalink
fix: replace file_url with doc_url
Browse files Browse the repository at this point in the history
  • Loading branch information
elisalimli committed Apr 13, 2024
1 parent bb1630b commit a928a47
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions vectordbs/qdrant.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async def convert_to_rerank_format(self, chunks: List[rest.PointStruct]):
{
"content": chunk.payload.get("content"),
"page_label": chunk.payload.get("page_label"),
"file_url": chunk.payload.get("file_url"),
"doc_url": chunk.payload.get("doc_url"),
}
for chunk in chunks
]
Expand Down Expand Up @@ -92,22 +92,12 @@ async def query(self, input: str, top_k: int = MAX_QUERY_TOP_K) -> List:
]

async def delete(self, file_url: str) -> None:
# client.count(
# collection_name="{collection_name}",
# count_filter=models.Filter(
# must=[
# models.FieldCondition(key="color", match=models.MatchValue(value="red")),
# ]
# ),
# exact=True,
# )

deleted_chunks = self.client.count(
collection_name=self.index_name,
count_filter=rest.Filter(
must=[
rest.FieldCondition(
key="file_url", match=rest.MatchValue(value=file_url)
key="doc_url", match=rest.MatchValue(value=file_url)
)
]
),
Expand All @@ -120,7 +110,7 @@ async def delete(self, file_url: str) -> None:
filter=rest.Filter(
must=[
rest.FieldCondition(
key="file_url", match=rest.MatchValue(value=file_url)
key="doc_url", match=rest.MatchValue(value=file_url)
)
]
)
Expand Down

0 comments on commit a928a47

Please sign in to comment.