I am using the below code to get list of data sorted by rate in descending order. However when I print the data object I don’t see them getting sorted. Rate is a number field in my schema. Am I doing anything wrong here? I need this hybrid search to work with filter and sorting.
where_filter = {
"path": ["check"],
"operator": "Equal",
"valueString": "true"
}
sort = {
"order": "desc",
"path": ["rate"]
}
query = "Performance most similar to " + prompt_arg
response = (
client.query
.get("Performance", ["id", "rate"])
.with_hybrid(
query=query
)
.with_sort(sort)
.with_where(where_filter)
#.with_limit(3)
.do()
)
data = json.loads(json.dumps(response))