elasticsearch
Multi prefix search with multi keys
A user wants to search a person by name and enter therefore something like: "Pe Lu" "Peter L" "Lustig P" All of these should match "Peter Lustig". The data is indexed with default settings having firstname and lastname split. I tried to use default prefix search using a bool "should" query having splitted the search term by whitespace. bool should prefix firstName Pe prefix name Pe prefix firstName Lu prefix name Lu But I do not get any results for this. What is the best way to achieve this?
Can you try following query:; { "query": { "bool": { "should": [ { "match_phrase_prefix": { "firstName": "Peter" } }, { "match_phrase_prefix": { "firstName": "Lu" } }, { "match_phrase_prefix": { "lastName": "Peter" } }, { "match_phrase_prefix": { "lastName": "Lu" } } ] } } }
Related Links
WHERE IN for Elastic search
how to do an atomic increment using elastic search update?
Insert data to ElasticSearch using NEST API
Elasticsearch aggregations, get additional field in bucket
Elasticsearch : match query with empty string as a value for field
How to use logstash's json filter?
Using minimum_should_match in filtered elasticSearch query
date not parsing correct in elasticsearch
Elasticsearch Filter by day of week
Cannot select time field for default index
elasticsearch nest index relational database
ElasticSearch - Phrase Suggestor
RCP with RabbitMQ connected to Logstash
Elasticsearch indexed search template generates empty strings in array
Can I use ElasticSearch mapping transform to duplicate a field
Drawing “opened count” over time given open-event and close-event documents