Realizing a prefix search across multiple tokens splitted by whitespace


(Alexander Kluth) #1

Although this is a topic which is discussed a lot on the internet I'm stuck
with accomplishing one thing and I tried a lot unto this point.

I want to have a prefix search on multiple tokens in a string (splitted by
whitespaces).

So, I've got the field Name with the content "Hamburg Altona" - now I want
to search for "Ham Alt" and get all documents where the Name field contains
a string starting with "Ham" and a string starting with "Alt".

I tried several analyzing and tokenizing settings (nGram, edgeNGram,
lowercase, standard etc. pp.) and several queries (phrase_prefix, prefix),
but I'm not able to get the wanted behavior as described above.

If further information is required just ask.

I really appreciate any pointers.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/7b09a4f3-06dc-4c25-af18-db0ca0cb9a72%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #2