Hybrid Search
Every search on your Opensolr Index looks for two things at once: the words the visitor typed and what the visitor means. Both are ranked together, in one list. Someone who types "a tyre for summer and winter" finds all-season tyres on a site that never uses those words, and someone who types a part number gets that exact part.
Opensolr built its own hybrid search engine for Solr to do this, the {!hybrid} query parser. It weighs the words and the meaning on the same scale, so neither one drowns the other, and the search mode you pick really does what it says. It runs on Opensolr's servers: there is nothing to install.
Five search modes
The Search Mode decides which results are let in. You pick it in WebCrawler > Settings > Search Tuning.
- Union (the default): results that match the words or the meaning. The widest net.
- KW Required (Keywords Required): only results that contain the words; the meaning improves the order. Good for product and part numbers.
- Meaning Req. (Meaning Required): only results about what was asked; the words improve the order. Good for questions in plain language.
- Intersection: only results that match both. The most precise.
- Lexical Only: the words only, no meaning, no AI used. Exact, word for word search.
More: Search mode.
Words or meaning: your balance
The Semantic ↔ Lexical Balance slider in Search Tuning sets how much each side weighs in the order. Toward Semantic, meaning leads: good for questions and ideas. Toward Lexical, the exact words lead: good for codes, SKUs and names. More: Semantic / lexical balance.
Where it works
- The hosted search page and the search you embed on your site.
- Your own code, in one API call: Search from your own code.
- The Drupal module and the WordPress plugin.
Filters, facets and sorting keep working as usual. Visitors can narrow any search with search operators.
When it runs
Hybrid search uses the AI of the plan of the account that owns the index. The free plan and every current plan include a monthly AI allowance of 500 AI requests; see pricing and API Quota. Understanding a new search counts as one AI request; a search that was understood before is free.
A search runs on the words only when:
- the Search Mode is Lexical Only;
- the plan has no AI, or this month's AI allowance is used up;
- the search is only one or two characters long;
- the AI is busy: the visitor still gets results at once, matched on the words.
On the hosted search page, visitors can turn AI off or back on for their own searches: AI on or off for visitors. Lexical Only always wins.
Try it: live examples
Each of these runs on a real Opensolr Index. None of the queries relies on exact keywords: the meaning is what finds the result.
More: the videos and live demos on Demo, or try it on your own site in RAG in 60 seconds.