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 standard query for performing full text queries, including fuzzy matching and phrase or proximity queries.
QueryBuilder query=QueryBuilders.matchQuery( "name", "kimchy elasticsearch");
The multi-field version of the match query.
QueryBuilder query=QueryBuilders.multiMatchQuery( "kimchy elasticsearch", "user", "message");
A more specialized query which gives more preference to uncommon words.
QueryBuilder query=QueryBuilders.commonTermsQuery("name", "kimchy");
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.
QueryBuilder query=QueryBuilders.queryStringQuery("+kimchy -elasticsearch");
A simpler, more robust version of the query_string syntax suitable for exposing directly to users.
QueryBuilder query=QueryBuilders.simpleQueryStringQuery("+kimchy -elasticsearch");
如对本文有疑问, 点击进行留言回复!!
网友评论