Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion query setting #4

Open
samatzp opened this issue Nov 19, 2023 · 4 comments
Open

Suggestion query setting #4

samatzp opened this issue Nov 19, 2023 · 4 comments

Comments

@samatzp
Copy link

samatzp commented Nov 19, 2023

Hi there!

Example query: mac and macb

How can I configure the response to be like this? --> https://codesandbox.io/s/meilisearch-autocomplete-suggestion-0yw3rg?file=/app.tsx

Meilisearch example screen:
2023-11-20_03-06-39
2023-11-20_03-06-30

Typesense example screen:
2023-11-20_03-08-00
2023-11-20_03-07-52

that is, the answer was only to the end of the word.

@jasonbosco
Copy link
Member

Could you try setting prioritize_token_position: true as a search parameter?

@samatzp
Copy link
Author

samatzp commented Nov 20, 2023

@jasonbosco

Result is same:
const results = await typesenseClient.collections('products').documents().search({
q: query,
query_by: 'name',
highlight_full_fields: 'name',
include_fields: 'name',
prioritize_token_position: true,
})

@jasonbosco
Copy link
Member

Oh wait, I just realized the dataset used by the Typesense demo does not have any MacBook products in the results.

The datasets you have in your screenshots are different, so that's why you don't see any MacBook results.

@samatzp
Copy link
Author

samatzp commented Nov 20, 2023

@jasonbosco

Thanks for the link to the dataset!
This weekend I will test meilisearch with your dataset)

Pls do not close until the result!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants