Releases: meilisearch/meilisearch-js-plugins
@meilisearch/[email protected]
🎉 Enhancement
Multi index search compatibility
-
72de4c8: - Compatibility with the
Index
widget.Drawbacks
Currently, for each index a request is made on, a separated request is made to Meilisearch. For example, if you have two indexes on which to search, two http requests are made.
In the next release of Meilisearch, a new
multi-search
API route is planned to be released (see PR). When it is released, the work-around will be removed and only one HTTP request will be done in all cases!
⚠️ Breaking Changes
Disjunctive facet search
-
72de4c8: - Change the behavior of the
or
operator parameter on theRefinmentList
widget.⚠️ This impacts the facet distribution numberDrawback
Currently, for each
facet value
selected in a differentfacet
a separate request is made to Meilisearch. Plus, an additional one containing all the facets filters. It results in tedious search requests and a high bandwidth cost.
For example, if I selectAdventure
on genres andMultiplayer
on players, one request is made with both facet filters, one with onlygenres=Adventure
and one with onlyplayers=Multiplayer
In the next release of Meilisearch, a new
multi-search
API route is planned to be released (see PR). When it is released, the work-around will be removed and only one HTTP request will be done in all cases!Explanation
The way the
facetDistribution
is calculated changed. ThefacetDistribution
shows the numbers of hits for each facet. For example:Given the following facet:
Genres - [ ] Adventure 7
The
facetDistribution
provides the information that there are7
hits containing the adventure genre.For the example, let's take the following facets:
Genres - [ ] Adventure 7 - [ ] Action 5 - [ ] Science Fiction 5 Players - [ ] Multiplayer 11 - [ ] Single player 7
Before, when selecting a facet value in a certain facet, the distribution of that facet was impacted.
- [x] Adventure 7 - [ ] Action 3 // <- number changed from 5 to 3 - [ ] Science Fiction 1 // <- number changed from 5 to 1 Players - [ ] Multiplayer 6 - [ ] Single player 3
With the new behavior, the distributed number are not changed when facet values are selected inside the same facet because a facet distribution is computed with a dedicated search request.
Genres - [x] Adventure 7 - [ ] Action 5 // <- number did not change - [ ] Science Fiction 5 // <- number did not change Players - [ ] Multiplayer 6 - [ ] Single player 3 Genres - [x] Adventure 7 // changed because of Multiplayer - [ ] Action 4 - [ ] Science Fiction 3 Players - [x] Multiplayer 6 - [ ] Single player 3
This is the conventional way of calculating the facet distribution. Similar to Algolia's behavior. If you prefer the old behavior, please consider opening an issue.
Patch Changes
- 33ae56b: Migrate the current repository to a turbo architecture
@meilisearch/[email protected]
Patch Changes
- 33ae56b: Migrate the current repository to a turbo architecture
v0.10.1-multi-index-search.0
⚠️ Breaking change
🚀 Enchancement
- The
Index
widget is now compatible and thus multi-index search is possible #888
The beta is published on npm, you can try it out.
Usage
download:
npm i @meilisearch/[email protected]
Usage example using React and the Index
widget
<InstantSearch indexName="movies" searchClient={searchClient}>
<SearchBox />
<h2>Movies</h2>
<Index indexName="movies">
<h2 style={{ margin: 0 }}>Genres</h2>
<RefinementList attribute="genres" operator="and" />
<Hits hitComponent={Hit} />
<Pagination />
</Index>
<h2>Games</h2>
<Index indexName="games">
<h2 style={{ margin: 0 }}>Genres</h2>
<RefinementList attribute="genres" />
<InfiniteHits hitComponent={Hit} />
</Index>
</InstantSearch>
Example with a very small dataset:
Thanks again to @bidoubiwa! 🎉
v0.10.1 🔗
🐛 Bug Fixes
- Keep both _geo and _geoloc fields in hits and hits._formatted (#896) @bidoubiwa
Thanks again to @bidoubiwa! 🎉
v0.10.0 🔗
This version makes this package compatible with Meilisearch v0.30.0 🎉
Check out the changelog of Meilisearch v0.30.0 for more information on the changes.
⚠️ Breaking change
paginationTotalHits
does not exist anymore #878
🚀 Enchancement
finitePagination
is now showcasing the exact number of pages based on the total number of document matched. #878
Thanks again to @bidoubiwa! 🎉
v0.10.0-beta.0 🧷
v0.9.0 🧷
This version makes this package compatible with Meilisearch v0.29.0 🎉
Check out the changelog of Meilisearch v0.29.0 for more information on the changes.
🚀 Enhancements
- New Meilisearch option
matchingStrategy
#832
⚠️ Breaking Changes
This breaking change may not affect you, but in any case, you should check your search queries if you want to keep the same behavior from v0.28
.
- The
NOT
filter keyword does not have an implicitlyEXIST
operator anymore. Check out for more information: meilisearch/meilisearch#2486
v0.8.2-beta.0 🔗
This version makes this package compatible with Meilisearch v0.29.1 🎉
Check out the changelog of Meilisearch v0.29.1 for more information on the changes.
🚀 Enhancements
- New MeiliSearch option
matchingStrategy
#832
v0.8.2 🔗
🐛 Bug Fixes
- Fix default zero facets on placeholdersearch and routing (#830) @bidoubiwa
Thanks again to @bidoubiwa! 🎉
v0.8.1-optional-words-beta.0 🔗
This version makes this package compatible with Meilisearch v0.29.0-optional-words.beta.1 🎉
In this version, you can try out the new optionalWords
search parameter we are testing out. For complete information on the feature, please refer to this guide.
🚀 Enhancements
- Feature prototype: define strategy on optional words during search #817
Usage
optionalWords
gives you the possibility to chose how Meilisearch should handle the presence of multiple query words.
For example, if your query is Hello world
by default Meilisearch returns documents containing either both Hello
and world
or documents that only contain hello
. This is the last
strategy, where words are stripped from the right.
The other strategy is none
, where both hello
and worlds
must be present in a document for it to be returned.
import { instantMeiliSearch } from '@meilisearch/instant-meilisearch'
const searchClient = instantMeiliSearch(
host,
apiKey,
{
optionalWords: 'none' // default last
}
)
Thanks again to @bidoubiwa ! 🎉