question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multi index search with Strapi and Meilisearch

See original GitHub issue

Description Hi 👋🏼 I have been using Strapi for some time now and am currently working on integrating strapi-plugin-meilisearch to implement Search in the website.

While I am able to get it working with React Instantsearch and Strapi, I see that every collection becomes its own index so to do a search across multiple collections if I want to implement a global search, I have to implement a multi-index search and I did follow these repos for the same with multiple <Index>

https://github.com/algolia/doc-code-samples/blob/master/React InstantSearch/multi-index-hits/src/App.js

https://github.com/algolia/react-instantsearch/tree/7520e893bbec8816f6e283438610ad845616b0b4/examples/multi-index

But still I see instantsearch searching only a single index as specified within <InstantSearch> (in this case stores) - any ideas why? I do see that search is working when I try calling the API directly via curl

Using “react-instantsearch-dom”: “^6.11.1”, “@meilisearch/instant-meilisearch”: “^0.5.0”,

And this is how the snippet looks like… The syntax seems to be correct but not sure why multi-index search doesn’t work…

image

image

Expected behavior Multi index search works with React instantsearch

Current behavior No hit fired during search

Environment (please complete the following information):

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
harish2704commented, Sep 13, 2021

PR #265 can also allow composite index

2reactions
liamb13commented, Jul 13, 2021

@tvvignesh, a good friend and developer @mattiebelt just created the following: https://github.com/MattieBelt/strapi-plugin-meilisearch

Thus far, I haven’t had much time to play but it’s working well for me at this stage!

image

The above is searching across 3 Strapi collections:

  • Articles
  • Resources
  • Tools
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Add Relevant Search to Your Strapi App Using ...
Search through your Strapi collections using MeiliSearch with this (almost) code-less tutorial.
Read more >
Integrate Meilisearch with Strapi v4
This tutorial will show you how to integrate Meilisearch with Strapi v4 to create a search-based web app.
Read more >
Search | Meilisearch Documentation v0.30
Search for documents matching a specific query in the given index. ... phrase search effectively splits it into multiple separate phrase searches: "Octavia....
Read more >
Indexing and performance | Meilisearch Documentation v0.30
Adding new documents to an index is a multi-threaded and memory-intensive operation. Meilisearch's indexes are at the core of what makes our search...
Read more >
Indexes | Meilisearch Documentation v0.30
Using an index's settings, you can customize search behavior for that index. ... This is because implicit index creation bundles multiple actions into...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found