Resolving Hybrid Query Error with 'vector_query'
TLDR Manish had an error with a hybrid query. Jason suggests using the field name embedding
instead of vec
and explains the weightage in hybrid searches.
2
Aug 30, 2023 (1 month ago)
Manish
03:37 PMvector_query
{"results":[{"code":400,"error":"Field `vec` does not have a vector query index."}]}%
Jason
03:42 PMManish
03:42 PM threadsCol := `{"name": "threads", "fields": [
{"name": ".*", "type": "auto"},
{"name": "embedding",
"type": "float[]",
"num_dim": 384
}
]}`
Jason
03:42 PMembedding
, you want to use that name instead of vec
in your vector queryManish
03:44 PMk:100
, if I want hybrid search? "embedding:([%s], k:100)"
Jason
03:45 PMManish
03:46 PMq
and vector_query
are present, would it automatically do a hybrid search?Jason
03:46 PMJason
03:47 PM0.25.1.rc5
though - fixed some issues related to this in recent builds1
Manish
03:47 PM query["query_by"] = "subject,summary,chats,embedding"
So, this order is roughly correct? The "subject, summary, and chats" fields would constitute 70% towards the rank, and embedding would constitute 30%?
Jason
03:48 PMManish
03:48 PMJason
03:48 PM1
Manish
03:52 PMJason
04:00 PMTypesense
Indexed 2786 threads (79% resolved)
Similar Threads
Utilizing Vector Search and Word Embeddings for Comprehensive Search in Typesense
Bill sought clarification on using vector search with multiple word embeddings in Typesense and using them instead of OpenAI's embedding. Kishore Nallan and Jason informed him that their development version 0.25 supports open source embedding models. They also resolved Bill's concerns regarding search performance, language support, and limitations in the search parameters.
Error in Implementing Vector Search
Krish faced an error while implementing vector search. After recreating the collection as suggested by Kishore Nallan, the issue was resolved.
Troubleshooting Typesense Query Freezes
Manish experienced an issue where their Typesense query freezes. After several checks and attempts to fix the issue, Jason identified that the problem was due to 'embedding' being included in 'query_by'. Removing 'embedding' resolved the issue.
Hybrid Search Distance Threshold Issue
Anish has an issue with search results not respecting the vector distance threshold when using hybrid search. Jason explains additional fields cause `vector_distance` to only apply to vector search results and suggests opening a feature request on GitHub.
Questions on Hybrid Search Feature in Upcoming Release
Chetan inquired about the compatibility and parameter control of hybrid search feature. Jason clarified its functionality, indicating its compatibility with manually created vec field and parameters affecting keyword vs semantic search results.