ElasticSearch match phrase Query

From GM-RKB
Jump to navigation Jump to search

An ElasticSearch match_phrase Query is an ElasticSearch match query that is a match_phrase query (that analyzes the text and creates a phrase query out of the analyzed text).



References

2012

  • http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-match-query.html#_phrase
    • The match_phrase query analyzes the text and creates a phrase query out of the analyzed text. For example:

      { "match_phrase" : { "message" : "this is a test" }}

      Since match_phrase is only a type of a match query, it can also be used in the following manner:

      { "match" : { "message" : { "query" : "this is a test", "type" : "phrase" } }}

      A phrase query maintains order of the terms up to a configurable slop (which defaults to 0).
      The analyzer can be set to control which analyzer will perform the analysis process on the text. It default to the field explicit mapping definition, or the default search analyzer,