Help for search

Hello,

i´m work since a few week with elastic and i search for a solution for the following problem:

I have a string, for example: "my wonderful car in Puerto de la Cruz", now i will search in the documents of city´s index if a match exists, based of the search terms.

The city contains only the city names, Puerto de la cruz, Santa Cruz, La Orotava... for example.

Based on this examples, it´s a way exist to realize this, that y become for this search Puerto de la Cruz (the match) return?

Thanks in advance!

You should be able to search for "my wonderful car in Puerto de la Cruz" in the city field and get good results back at least in that case. However, if the input string contains words that are found in other names of cities it's possible that Puerto de la Cruz doesn't come up on top. Elasticsearch doesn't contain a natural language processor that's able to extract names of places from an arbitrary sentence, so if you can't give extra clues about what words are important for the query it's possible that uninteresting words are going to skew the results.