Full text queries

edit

Full text queries

edit

The high-level full text queries are usually used for running full text queries on full text fields like the body of an email. They understand how the field being queried is analyzed and will apply each field’s analyzer (or search_analyzer) to the query string before executing.

The queries in this group are:

match query
The standard query for performing full text queries, including fuzzy matching and phrase or proximity queries.
multi_match query
The multi-field version of the match query.
common_terms query
A more specialized query which gives more preference to uncommon words.
query_string query
Supports the compact Lucene query string syntax, allowing you to specify AND|OR|NOT conditions and multi-field search within a single query string. For expert users only.
simple_query_string
A simpler, more robust version of the query_string syntax suitable for exposing directly to users.

Match Query

edit

See Match Query

matchQuery(
        "name",                                              
        "kimchy elasticsearch");                             

field

text

Multi Match Query

edit

See Multi Match Query

multiMatchQuery(
        "kimchy elasticsearch",                              
        "user", "message");                                  

text

fields

Common Terms Query

edit

See Common Terms Query

commonTermsQuery("name",                                     
                 "kimchy");                                  

field

value

Query String Query

edit

See Query String Query

queryStringQuery("+kimchy -elasticsearch");

Simple Query String Query

edit

See Simple Query String Query

simpleQueryStringQuery("+kimchy -elasticsearch");