jskinner215 commited on
Commit
955af6a
·
1 Parent(s): 6a501ae

Update weaviate_utils.py

Browse files
Files changed (1) hide show
  1. weaviate_utils.py +8 -9
weaviate_utils.py CHANGED
@@ -11,18 +11,17 @@ def hybrid_search_weaviate(client, selected_class, query):
11
  Perform a hybrid search on Weaviate using the provided class and query.
12
  Return the results as a list of dictionaries.
13
  """
14
- # Construct the hybrid search query
15
- st.write(f"Search query type: {type(search_query)}, Value: {search_query}")
16
-
17
  search_query = {
18
- "class": selected_class,
19
- "properties": [], # Retrieve all properties for now
20
- "searchString": query,
21
- "limit": 100 # Limit to 100 results for now
 
22
  }
23
-
24
  # Perform the hybrid search
25
- results = client.query.get(search_query)
26
 
27
  return results
28
 
 
11
  Perform a hybrid search on Weaviate using the provided class and query.
12
  Return the results as a list of dictionaries.
13
  """
14
+ # Construct the search query
 
 
15
  search_query = {
16
+ "query": {
17
+ "path": ["*"],
18
+ "operator": "fuzzy",
19
+ "value": query
20
+ }
21
  }
22
+
23
  # Perform the hybrid search
24
+ results = client.query.get(selected_class, search_query) # Updated this line
25
 
26
  return results
27