Skip to content

Commit bc55a91

Browse files
authored
fix: replace file_url with doc_url (#97)
1 parent bb1630b commit bc55a91

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

vectordbs/qdrant.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ async def convert_to_rerank_format(self, chunks: List[rest.PointStruct]):
4545
{
4646
"content": chunk.payload.get("content"),
4747
"page_label": chunk.payload.get("page_label"),
48-
"file_url": chunk.payload.get("file_url"),
48+
"doc_url": chunk.payload.get("doc_url"),
4949
}
5050
for chunk in chunks
5151
]
@@ -92,22 +92,12 @@ async def query(self, input: str, top_k: int = MAX_QUERY_TOP_K) -> List:
9292
]
9393

9494
async def delete(self, file_url: str) -> None:
95-
# client.count(
96-
# collection_name="{collection_name}",
97-
# count_filter=models.Filter(
98-
# must=[
99-
# models.FieldCondition(key="color", match=models.MatchValue(value="red")),
100-
# ]
101-
# ),
102-
# exact=True,
103-
# )
104-
10595
deleted_chunks = self.client.count(
10696
collection_name=self.index_name,
10797
count_filter=rest.Filter(
10898
must=[
10999
rest.FieldCondition(
110-
key="file_url", match=rest.MatchValue(value=file_url)
100+
key="doc_url", match=rest.MatchValue(value=file_url)
111101
)
112102
]
113103
),
@@ -120,7 +110,7 @@ async def delete(self, file_url: str) -> None:
120110
filter=rest.Filter(
121111
must=[
122112
rest.FieldCondition(
123-
key="file_url", match=rest.MatchValue(value=file_url)
113+
key="doc_url", match=rest.MatchValue(value=file_url)
124114
)
125115
]
126116
)

0 commit comments

Comments
 (0)