I have a document with field: "title1" as: "A380 Familiarization".
When I run this query: the search results are empty. The document is not returned as part of the search query results.
GET index/_search
{
"from": 0,
"size": 10,
"_source":
[
"title1"
],
"query":
{
"bool":
{
"must":
{
"bool":
{
"should":
[
{
"multi_match":
{
"query": "A380 Familiarization",
"analyzer": "search_analyzer1",
"type": "phrase",
"fields":
[
"title1"
]
}
}
]
}
}
}
},
"sort":
[
{
"_score": "desc"
}
]
}
The field title1 is indexed using a different analyzer:
"title1": {
"type": "text",
"fields": {
"raw": {
"type": "keyword"
}
},
"analyzer": "search_analyzer2"
}
Here is the definition of search_analyzer2:
"search_analyzer2": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"icu_folding",
"word_delimiter_filter",
"edge_ngram_filter"
],
"char_filter": [
"html_strip"
]
}
And, here is the definition of search_analyzer1:
"search_analyzer1": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"icu_folding"
],
"char_filter": [
"html_strip"
]
}
When I run analyze command using both the analyzers, there are overalapping tokens. Both return A380 but still the document is not returned.
GET index/_analyze
{
"analyzer": "search_analyzer1",
"text": "A380"
}
GET index/_analyze
{
"analyzer": "search_analyzer2",
"text": "A380"
}
Please advise why the document is not returned in the search results?