typesense-autocomplete-demo icon indicating copy to clipboard operation
typesense-autocomplete-demo copied to clipboard

Suggestion query setting

Open samatzp opened this issue 2 years ago • 4 comments

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.

samatzp avatar Nov 19 '23 20:11 samatzp

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

jasonbosco avatar Nov 20 '23 01:11 jasonbosco

@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, })

samatzp avatar Nov 20 '23 08:11 samatzp

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.

jasonbosco avatar Nov 20 '23 16:11 jasonbosco

@jasonbosco

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

Pls do not close until the result!)

samatzp avatar Nov 20 '23 17:11 samatzp