Elastic Search Query Command collection

Source: Internet
Author: User
Tags elastic search

Technorati Tags: elastic search,query,commands

Basic query: The simplest way to query

query:{"term": {"title": "Crime"}}

Terms: The target column contains the specified word

Match: The input "phrase" will be broken down into words

BOOL Match:match is decomposed into multiple words, and is the relationship of and, by default, or.

Match phrase: participle, but to specify the number of words between participles

Match phrase prefix:

Multi match: Match query that acts on multiple fields

Query string: Supports Lucence query syntax, TITLE:CRIME^10+TITLE:PUNISHMENT-OTITLE:CAT, and +-= for include and exclude, with ^ for weights

Field query: is a simplified version of the Queyr query

IDS query: Special Case of field query, only for ID

Prefix query: Similar to term query, but not all matches

Fuzzy like this query: query similar text, how to calculate the similarity?

Fuzzy like this field query: select title

Fuzzy query: Vague query, according to the editing distance between words to get

Wildcard query: Use *? The term query

More like This:like and set the range.

Range: Numeric range query, from to

Query rewrite???

------------------------------------------------

Filter queries to filter query results

filter:term{"Year": 1981}, filtering data for year 1981 in the results

Filter:range: The data specified in the filter result is listed in the specified range

Filter:exists: There is a column of data in the result

Filter:missing: Data in a column is missing from the result

Filter:scripts:bool expression: Data that satisfies the criteria specified by the script in the result

Filter:type: Type filtering

Filter:limit: Limit a certain number of results

Filter:ids: Qualifying a special set of IDs

Filter:not,and,or: combination of multiple conditions

-----------------------------------

Combinatorial query: Combined query with multiple criteria

bool:{"must": {Query 1}, "should": {Query 2}}

Boosting: Encapsulates multiple queries, positive score increases, negative fractions are reduced

Costant Score: Constant fraction

Indices: Querying on Multiple indexes

Custom Filters Score:

-------------------------

Sort the results of a query

"Sort": {"a": "Desc"}

Elastic Search Query Command collection

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.