[v1.8] Hybrid search improvements
Related to https://github.com/meilisearch/integration-guides/issues/299
Quick explanation of the changes
Related issue in the engine: https://github.com/meilisearch/meilisearch/issues/4481
⚠️ Refer to
- the usage page for any details about the changes: https://meilisearch.notion.site/v1-8-AI-search-API-usage-135552d6e85a4a52bc7109be82aeca42?pvs=4
- for a more global and less "digest" overview of the changes (but less precise) check the in-progress changelog: https://github.com/meilisearch/engine-team/pull/64/files
Summary of changes:
- Handle breaking changes about search
vectoris not longer displayed in the search response_semanticScoreis no longer returned in the search response- When adding
"showRankingScoreDetails": trueto a semantic search query, the vector and itsvalueare no longer displayed
- Add new models
- REST embedder
- Ollama
- Addition of
distributionfield in settings - New
semanticHitCountfield in search response - Now Meilisearch hides API key
TODO
- [ ] Ensure breaking changes fit in the code base. It's about removing fields, so "fit in the code base" means
- [ ] Ensure the code base does not expect any of these fields
- [x] Fix the tests (if any are broken because of these changes)
- [ ] Ensure the support of the new models
restandollama - [x] Ensure the support of the
distributionfield in index settings for embedders - [x] Ensure the support of the
semanticHitCountin the search response for hybrid/semantic search - [x] Now Meilisearch hides API key: fix the elated tests.
- [ ] Add tests for each of these additions
⚠️ Make PRs pointing to bump-meilisearch-v1.8.0 and NOT main. Please do 1 PR for all of these changes, and not several.
Please add support for hybrid in FacetSearchQuery. I had to extend that class to make it work with vector search. Thanks.
Example:
Meilisearch\Contracts\FacetSearchQuery
public function setHybrid(array $hybrid): FacetSearchQuery
{
$this->hybrid = $hybrid;
return $this;
}
setHybrid([
'semanticRatio' => 0.5,
'embedder' => 'default'
]);
Hi @DRN88, I'm not sure if I followed you want to use the vector search in the facetSearch but it is not supported https://www.meilisearch.com/docs/reference/api/facet_search
Closed by #639