Open N-pharmarack opened 2 years ago
@N-pharmarack In this code snippet:
createQuerySuggestionsPlugin({
searchClient,
indexName: 'query_suggestions1',
getSearchParams() {
return recentSearchesPlugin.data.getAlgoliaSearchParams({
hitsPerPage: 5,
});
},
Do you have a collection called query_suggestions1
in Typesense? You'd need to create this for this to work, or you might just want to point it to the companies1
collection you already have.
Also do you see any JS errors in the browser console?
Yes I have created a collection named query_suggestions1, it only has 'query' , 'objectID' and 'name' fields
I was getting error earlier that, you don't have objectID in your schema, so I created a new collection, 'objectID' is basically ID for alogia.
Hi I am having the same issue please help
If you're able to share a codesandbox link with a minimal self-contained project that I can run and replicate the issue you're seeing, I can help debug from there...
It's interesting how algolia propose a solution using react instant search and autocomplate, it looks easy not enought but easy https://www.algolia.com/doc/ui-libraries/autocomplete/integrations/with-react-instantsearch/?client=App.tsx but what about to implement something like this with typesense ? i suppose there is not anything build on it for handle it? but it there a good recipe to do it ?
Description
Typesense has made our life so easy by providing fast and free search capability, but there's one thing that is keeping away my searchbar from going into production, and that is Autocomplete, now a days no one wants to type whole name of product, computers must be smart enough to predict that.
I'm trying to implement Autocomplete using @algolia/autocomplete, Autocomplete uses separate collection for query suggestions purpose.
Code for App.js
Please excuse the length of code, I'm attaching just to be 100% sure I'm not wrng anywhere
Main part to look into in
const plugins = .......
And comes from below code :
Actual Behavior
What I'm able to achieve is in below screenshot, I'm able to fetch data 'marked in red boxes'![image](https://user-images.githubusercontent.com/95023092/162144786-07235860-15ec-48a2-986f-f6c286ea909c.png)
Expected Behavior
What I'm not getting is when I type it is not rendering anything![image](https://user-images.githubusercontent.com/95023092/162144962-ef62c756-2864-4813-aa5d-6446286cbb8a.png)
It should only get me 'Stark Industry' but it not doing anything as I type,
Your help is much needed in this @jasonbosco