Meilisearch v1.3.0 introduces vector search, visible ranking score details, and the possibility to define fields to search on at search time. It also now includes the ability to search within facet values and sort facet values by count.
🧰 All official Meilisearch integrations (including SDKs, clients, and other tools) are compatible with this Meilisearch release. Integration deployment happens between 4 to 48 hours after a new version becomes available.
Some SDKs might not include all new features—consult the project repository for detailed information. Is a feature you need missing from your chosen SDK? Create an issue letting us know you need it, or, for open-source karma points, open a PR implementing it (we'll love you for that ❤️).
Say goodbye to server deployment and manual updates with Meilisearch Cloud. Get started with a 14-day free trial! No credit card required.
You can now use Meilisearch as a vector store. Meilisearch allows you to add vector embeddings generated by third-party software, and use embeddings when searching with the /search
or /multi-search
routes.
This experimental feature can be enabled via the HTTP API using v1.3.0's new /experimental-features
endpoint.
curl \
-X PATCH 'http://localhost:7700/experimental-features/' \
-H 'Content-Type: application/json' \
--data-binary '{
"vectorStore": true
}'
For the first iteration of this feature you must compute the vectors using a third-party tool such as Hugging Face, Cohere, or OpenAI. Once that is done, include them in your documents using the _vectors
field. Finally, send the documents with vector data to your instance. A single document may contain multiple vectors.
curl -X POST -H 'content-type: application/json' \
'localhost:7700/indexes/songs/documents' \
--data-binary '[
{ "id": 0, "_vectors": [0, 0.8, -0.2], "title": "Across The Universe" },
{ "id": 1, "_vectors": [1, -0.2, 0], "title": "All Things Must Pass" },
{ "id": 2, "_vectors": [[0.5, 3, 1], [-0.2, 4, 6]], "title": "And Your Bird Can Sing" }
]'
Use the new vector
search parameter with the /search
and /multi-search
to search for documents with the nearest vector. You must compute the vector query with a third-party tool.
curl -X POST -H 'content-type: application/json' \
'localhost:7700/indexes/songs/search' \
--data-binary '{ "vector": [0, 1, 2] }'
When you use vector search, returned documents include a _semanticScore
field.
{
"hits": [
{ "id": 0, "_vectors": [0, 0.8, -0.2], "title": "Across The Universe", "_semanticScore": 0.6754 },
{ "id": 1, "_vectors": [1, -0.2, 0], "title": "All Things Must Pass", "_semanticScore": 0.7546 },
{ "id": 2, "_vectors": [[0.5, 3, 1], [-0.2, 4, 6]], "title": "And Your Bird Can Sing", "_semanticScore": 0.78 }
],
"query": "",
"vector": [0, 1, 2],
"processingTimeMs": 0,
"limit": 20,
"offset": 0,
"estimatedTotalHits": 2
}
🗣️ This feature is experimental and we need your help to improve it! Share your thoughts and feedback on this GitHub discussion.
Done by @Kerollmops in #3825 and #3948
Use the new showRankingScore
search parameter to see the ranking scores for returned documents.
curl \
-X POST 'http://localhost:7700/indexes/movies/search' \
-H 'Content-Type: application/json' \
--data-binary '{ "q": "Batman Returns", "showRankingScore": true }'
Each returned document will include a _rankingScore
property displaying a score between 0 and 1. The higher the ranking score, the more relevant the document.
"_rankingScore": 0.8575757575757575,
View detailed scores per ranking rule for each document with the experimental showRankingScoreDetails
search parameter.
curl \
-X POST 'http://localhost:7700/indexes/movies/search' \
-H 'Content-Type: application/json' \
--data-binary '{ "q": "Batman Returns", "showRankingScoreDetails": true }'
When showRankingScoreDetails
is set to true
, returned documents include a _rankingScoreDetails
field. This field contains score values for each ranking rule.
"_rankingScoreDetails": {
"words": {
"order": 0,
"matchingWords": 1,
"maxMatchingWords": 1,
"score": 1.0
},
"typo": {
"order": 1,
"typoCount": 0,
"maxTypoCount": 1,
"score": 1.0
},
"proximity": {
"order": 2,
"score": 1.0
},
"attribute": {
"order": 3,
"attributes_ranking_order": 0.8,
"attributes_query_word_order": 0.6363636363636364,
"score": 0.7272727272727273
},
"exactness": {
"order": 4,
"matchType": "noExactMatch",
"matchingWords": 0,
"maxMatchingWords": 1,
"score": 0.3333333333333333
}
}
This experimental feature can be turned on via the HTTP API using v1.3.0's new /experimental-features
endpoint.
curl \
-X PATCH 'http://localhost:7700/experimental-features/' \
-H 'Content-Type: application/json' \
--data-binary '{
"scoreDetails": true
}'
🗣️ This feature is experimental and we need your help to improve it! Share your thoughts and feedback on this GitHub discussion.
The attribute
ranking rule now determines relevancy based on the distance to the position of the word in the query rather than the absolute distance to the beginning of a document.
Previously, documents with attributes containing search terms at the beginning of the attribute would be considered more relevant than documents containing search terms at the end of an attribute.
Done by @dureuill in #3771 and #3949
attributesToSearchOn
is a new search parameter accepting an array of strings indicating one or more document attributes. Queries using attributesToSearchOn
will restrict the search to the indicated attributes.
Attributes passed to attributesToSearchOn
must be in the searchable attributes list.
Given the following dataset:
{
"id": 0,
"name": "Our Wives Under the Sea",
"genre": ["horror", "scifi"],
"synopsis": "A woman returns to her wife transformed after a deep-sea adventure."
},
{
"id": 1,
"name": "A Strange and Stubborn Endurance",
"genre": ["adventure"],
"synopsis": "A man must overcome trauma and fight off a mysterious assassin."
}
And the following query:
{
"q": "adventure",
"attributesToSearchOn": ["genre"]
}
Meilisearch will only return document 1.
Both documents contain the term "adventure"
, but "attributesToSearchOn": ["genre"]
instructs Meilisearch to only consider results found on the genre
field.
Done by @ManyTheFish and @dureuill in (#3834, #3915)
The new endpoint POST /indexes/{index}/facet-search
allows you to search for facet values. Only fields defined as filterableAttributes
will be facet-searchable.
Facet search supports prefix search and typo tolerance.
curl \
-X POST 'http://localhost:7700/indexes/movies/facet-search' \
-H 'Content-Type: application/json' \
--data-binary '{
"facetName": "genres",
"facetQuery": "a"
}'
Done by @Kerollmops in (#3699)
Order facets by count
using the sortFacetValuesBy
property of the faceting
index settings. This allows you to sort facet values in descending order by the number of matched documents containing that facet value.
It is possible to change this ordering for all facets using *
:
curl \
-X PATCH 'http://localhost:7700/indexes/movies/settings/faceting \
-H 'Content-Type: application/json' \
--data-binary '{
"sortFacetValuesBy": {"*": "count"}
}'
Alternatively, it is possible to order a single facet by count
, while other attributes follow alphanumeric ordering:
curl \
-X PATCH 'http://localhost:7700/indexes/movies/settings/faceting \
-H 'Content-Type: application/json' \
--data-binary '{
"sortFacetValuesBy": {"*": "alpha", "genre": "count"}
}'
Done by @Kerollmops in (#3612)
- Enhance Japanese word segmentation (#218) @mosuka
- Enhance separator-based Tokenization (#215) @ManyTheFish
- words containing
_
are now properly segmented into several words - brackets
{([])}
are no longer considered as context separators for theproximity
ranking rule
- words containing
Done by @ManyTheFish, @mosuka in [#3866] and in Charabia v0.8.1
The /tasks
route now displays the total number of tasks in the task queue with a total
property. It also displays the total number of tasks within a specific filter e.g. you can view the total number of successfully processed tasks with /tasks?statuses=succeeded
. This detail gives insight into the progress of processed tasks over time.
Done by @Kerollmops in (#3889)
- Improve the Prometheus
/metrics
experimental feature (#625). Provides metrics on the task queue such as the number of queued tasks and the number of processing tasks. Adds the real database size used by Meilisearch. Add "meilisearch" prefix to metrics. ExposeslastUpdate
andisIndexing
in/stats
endpoint (#3789, #3861, #3851) @irevoire @dureuill @gentcys - Reduce index size (~15%) by removing an internal database (#3819) @loiclec
- Add new
/experimental-features
endpoint to configurescoreDetails
andvectorStore
(#3850) @dureuill - Reduce deserialization time by using
RoaringBitmap::deserialize_unchecked_from
(#3788) @Kerollmops - Re-enable autobatching for addition and deletion tasks (#3670) @irevoire
- Improve local search preview web interface and update mini-dashboard to version v0.2.11 (#3955) @bidoubiwa
- Fix matching results returned by the
exactness
ranking rules when there are hard separators present (#3824) @dureuill - Fix an issue where searching for words without
.
doesn't match any string in the index (#151, #3778) - Fix case-sensitive search result issues with camelCasing. For example, a search for
dellonghi
would previously not return a document withDeLonghi
in it. This deactivates camel case segmentation that was introduced in v1.2.0 (#3921) @ManyTheFish - Fix an issue around incorrect deletion of documents when using the
disableOnAttributes
typo setting (#3819) @loiclec - Replace the
atty
dependency with theis-terminal
due to security vulnerability (#3878) @Kerollmops - Fix a panic when sorting geo fields represented by strings (#3929) @Kerollmops
- Fix performance issue on
/stats
by no longer computing total size of the update files folder (#3933) @Kerollmops - Security: use the new safe
read-txn-no-tls
heed feature (#3952) @Kerollmops - Fix an issue when querying number by updating Charabia (#3937) @ManyTheFish
-
Dependencies upgrade
- Bump actions/setup-go from 3 to 4 (#3805)
- Bump Swatinem/rust-cache from 2.2.1 to 2.4.0 (#3803)
- Bump svenstaro/upload-release-action from 2.5.0 to 2.6.1 (#3804)
-
CIs and tests
- Add a cron test with disabled tokenization (with @roy9495) (#3779) @curquiza
- Improve SDK CI to choose the Docker image (#3844, #3813, #3783) @curquiza
- Fix error messages in
check-release.sh
(#3799) @vvv
-
Documentation
- Move comments above keys in config.toml (#3731) @jirutka
- Add more documentation to graph-based ranking rule algorithms (#3835) @loiclec
- Fix some broken links (#3853) @0xflotus
- Update UTM campaign (#3953) @macraig
-
Misc
- Revert "Improve docker cache" (#3781) @curquiza
- Fix some typos (#3842) @cuishuang
- Fix analytics properties on multiple events (#3877) @dureuill
- Fix the way we compute the 99th percentile (#3891) @Kerollmops
❤️ Thanks again to our external contributors:
- Meilisearch: @cuishuang, @jirutka, @vvv, @0xflotus, @roy9495, @gentcys
- Charabia: @mosuka, @vvv