Yes, for serverless indexes, Pinecone recommends using separate dense-only and sparse-only indexes for more flexible and accurate hybrid search . This is demonstrated in the code example you referenced, which shows two separate index instances being used for hybrid search
Query data - Pinecone Docs .
The workflow involves:
- Searching the dense index for semantic matches
- Searching the sparse index for lexical/keyword matches
- Merging and deduplicating the results
This approach allows you to combine the strengths of both semantic and keyword searching while maintaining separate optimized indexes for each type of search .
For pod-based indexes, there is an alternative option to use a single hybrid index that can store both sparse and dense vectors together , though this is limited to s1 and p1 pod types using the dotproduct metric .
Hope that helps!
PS - I’d also recommend checkout out our YouTube channel for video webinar content on doing hybrid search