Help with search results

Hello there!

I'm new to elastic and have been trying the whole day to figure out a way of achieve the following:

Imagine I have a list of users, some of them named "Carrie Elastic" and "Car Lastname", when I do a query with the match set to "Car", I get both of them, when I do a search with "Carrie" I still get the two but ordered accordingly to the score.

The thing I'm trying to do is to exclude "Car" as soon as the user keeps typing (and making the search more specific).

Already tried with fuzzy, terms, query_string and they work at some point, some of them stop working when I have the full name typed (and this is not desired). Don't think wildcard or regexp is a solution so didn't try them.

Any help is appreciated. Thanks

You can use a ngram based analyzer at index time and a simple analyzer at search time.

The last example of this script shows it:


Thank you sir, I'll give it a look. Seems a lot more complex than I thought

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