ElasticSearch term query vs query_string?

Why doesn’t the term query match my document?

String fields can be analyzed (treated as full text, like the body of an email), or not_analyzed (treated as exact values, like an email address or a zip code). Exact values (like numbers, dates, and not_analyzed strings) have the exact value specified in the field added to the inverted index in order to make them searchable.

By default, however, string fields are analyzed. This means that their values are first passed through an analyzer to produce a list of terms, which are then added to the inverted index.

There are many ways to analyze text: the default standard analyzer drops most punctuation, breaks up text into individual words, and lower cases them. For instance, the standard analyzer would turn the string “Quick Brown Fox!” into the terms [quick, brown, fox].

Term Query

你可能感兴趣的:(ElasticSearch term query vs query_string?)