Search query returning a different result instead of following the query

I'm trying to search joseph sunny but when I type and reach joseph sun I'm getting this result which finds a person with just sun in the name field. See the screenshots for clarity - running self-hosted.

When i type joseph sunny completely

When I reach joseph sun

Hey @varunharidas ,

I think that's expected. As you can probably imagine, I think our search sees the exact match on "sun" and so scores the document really well.

I'm not sure if there's any way to work around it. If you wanted to, you could probably apply a value boost on the "name" field for "Joseph Sunny", or even create a curation for "joseph sun".

Are you using this for an autocomplete? If so, you could use Query Suggestions which would probably give you the behavior you are looking for.

Otherwise, in my opinion I'd just leave this as is. At the end of the day, do you think this would cause a user to not find what they're looking for?

1 Like

Hi @JasonStoltz,

Okay I got it. I think I was using search endpoint for displaying suggestions :man_facepalming:t2:
Thanks for pointing it out. Well explained :boom:

@JasonStoltz Actually this came up after querying from algolia dash, as they are displaying query suggestion when we search in the index from their dashboard. However app-search is using search endpoint dynamically to display results below as they need to show the whole document. Got it now. :+1:

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.