Skip to content

Releases: meilisearch/meilisearch-js-plugins

@meilisearch/[email protected]

14 Feb 16:44
a6b28ba
Compare
Choose a tag to compare

🎉 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 the RefinmentList widget.

    ⚠️ This impacts the facet distribution number

    Drawback

    Currently, for each facet value selected in a different facet 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 select Adventure on genres and Multiplayer on players, one request is made with both facet filters, one with only genres=Adventure and one with only players=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. The facetDistribution shows the numbers of hits for each facet. For example:

    Given the following facet:

    Genres
    - [ ] Adventure 7
    

    The facetDistribution provides the information that there are 7 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.

    See complete explanation here

Patch Changes

  • 33ae56b: Migrate the current repository to a turbo architecture

@meilisearch/[email protected]

08 Feb 12:51
219144d
Compare
Choose a tag to compare
Pre-release

Patch Changes

  • 33ae56b: Migrate the current repository to a turbo architecture

v0.10.1-multi-index-search.0

15 Dec 16:00
Compare
Choose a tag to compare
Pre-release

⚠️ Breaking change

  • Facets behavior changed to disjunctive facet search see #884 added in #888

🚀 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:

Screenshot 2022-12-20 at 15 41 27

Thanks again to @bidoubiwa! 🎉

v0.10.1 🔗

01 Dec 15:52
36cb662
Compare
Choose a tag to compare

🐛 Bug Fixes

  • Keep both _geo and _geoloc fields in hits and hits._formatted (#896) @bidoubiwa

Thanks again to @bidoubiwa! 🎉

v0.10.0 🔗

28 Nov 15:50
067c721
Compare
Choose a tag to compare

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 🧷

17 Nov 12:39
Compare
Choose a tag to compare
v0.10.0-beta.0 🧷 Pre-release
Pre-release

⚠️ 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

v0.9.0 🧷

03 Oct 15:18
3067be3
Compare
Choose a tag to compare

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.

v0.8.2-beta.0 🔗

05 Sep 14:53
Compare
Choose a tag to compare
v0.8.2-beta.0 🔗 Pre-release
Pre-release

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 🔗

01 Sep 15:21
a609869
Compare
Choose a tag to compare

🐛 Bug Fixes

  • Fix default zero facets on placeholdersearch and routing (#830) @bidoubiwa

Thanks again to @bidoubiwa! 🎉

v0.8.1-optional-words-beta.0 🔗

02 Aug 14:36
2e6cd36
Compare
Choose a tag to compare
Pre-release

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 ! 🎉