@@ -45,7 +45,7 @@ async def convert_to_rerank_format(self, chunks: List[rest.PointStruct]):
45
45
{
46
46
"content" : chunk .payload .get ("content" ),
47
47
"page_label" : chunk .payload .get ("page_label" ),
48
- "file_url " : chunk .payload .get ("file_url " ),
48
+ "doc_url " : chunk .payload .get ("doc_url " ),
49
49
}
50
50
for chunk in chunks
51
51
]
@@ -92,22 +92,12 @@ async def query(self, input: str, top_k: int = MAX_QUERY_TOP_K) -> List:
92
92
]
93
93
94
94
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
-
105
95
deleted_chunks = self .client .count (
106
96
collection_name = self .index_name ,
107
97
count_filter = rest .Filter (
108
98
must = [
109
99
rest .FieldCondition (
110
- key = "file_url " , match = rest .MatchValue (value = file_url )
100
+ key = "doc_url " , match = rest .MatchValue (value = file_url )
111
101
)
112
102
]
113
103
),
@@ -120,7 +110,7 @@ async def delete(self, file_url: str) -> None:
120
110
filter = rest .Filter (
121
111
must = [
122
112
rest .FieldCondition (
123
- key = "file_url " , match = rest .MatchValue (value = file_url )
113
+ key = "doc_url " , match = rest .MatchValue (value = file_url )
124
114
)
125
115
]
126
116
)
0 commit comments