I want to do a multi_match query for 3 different fields, but I want 2 of those fields (indexed as text using standard analyzer) to use the english language analyzer and the 3rd one to use the standard analyzer. I want to do this on the query side, before trying to modify anything on the index mapping.
I heard something about adding a .english notation after the field name to use english analyzer, which seems successfully when specifying it for one field, but I'm getting empty results when specifying it for two.
Here is the example of the query I'm trying
GET myindex/_search
{
"query": {
"multi_match": {
"query": "example of the text imput containing 843u43ew machine codes",
"type": "most_fields",
"fields": ["field1.english","field2.english", "field3"]
}
}
}
Could you please let me know if I'm doing something wrong?
I don't have configured multi-fields with the english analyzer. I'm assuming that adding the .english is doing the analyzer specification.
Here are the mappings I have for those fields:
I'm looking for a way to do this without altering the index if it's possible.
Is the assumption that adding .english to the field name is changing the analyzer to english wrong? Why the query is running when I use field1.english if that field name is not configured as a multi-field?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.