Skip to content

Commit 4d367cc

Browse files
Removing unnecessary code
Description: Removing unnecessary code from the filter section. The removed section is also faulted since the "Select" parameter is ingesting a string, not a list. Lines: 175-179 Removed Code: search_results = search_client.search( search_text=query, top=10, filter="search.ismatch('ice*', 'locations', 'full', 'any')", select="title, chunk, locations"
1 parent 45b8a8a commit 4d367cc

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

articles/search/tutorial-rag-build-solution-query.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -167,16 +167,10 @@ search_results = search_client.search(
167167
vector_queries= [vector_query],
168168
filter="search.ismatch('ice*', 'locations', 'full', 'any')",
169169
select=["title", "chunk", "locations"],
170-
top=5,
170+
top=5
171171
)
172172

173173
sources_formatted = "=================\n".join([f'TITLE: {document["title"]}, CONTENT: {document["chunk"]}, LOCATIONS: {document["locations"]}' for document in search_results])
174-
175-
search_results = search_client.search(
176-
search_text=query,
177-
top=10,
178-
filter="search.ismatch('ice*', 'locations', 'full', 'any')",
179-
select="title, chunk, locations"
180174
```
181175

182176
Results from the filtered query should now look similar to the following response. Notice the emphasis on ice cover.

0 commit comments

Comments
 (0)