37.query string, _all metadata

Source: Internet
Author: User

Key points of knowledge

1 , query string Basic Syntax

2 , _all Metadata the Understanding

First,query string Basic syntax

1 , get/test_index/test_type/_search?q=test_field:test

Enquiry Test_field This field (field) contains all the data for the keyword test.

2 , get/test_index/test_type/_search?q=+test_field:test

" + "means that you must include the following keywords Test , actually add this " + "The numbers are all the same.

3 , get/test_index/test_type/_search?q=-test_field:test

" - "means that you must not include the following keywords . Test .

The principle and function of _all metadata

Get/test_index/test_type/_search?q=test

You can use this syntax to search directly for all Field , any one Field contains the specified keyword to search for. This syntax uses the principle of _all metadata .

When the es is indexed, when we insert aDocument, it contains a number ofField, at this point,esWill automatically add multipleFieldvalues, all concatenated together in string form, into a long string, as_all Fieldand then creates an inverted index after the word breaker. If the search is not specified for a particularFieldSearch , the default search_all Fieldvalue that contains all of theFieldthe value.

For example, suppose there is a Document the values are as follows:

{

"Name": "Jack",

"Age": 26,

"Email": "[email protected]",

"Address": "Guamgzhou"

}

es in the _all Metadata the value is "Jack protected [email] guangzhou" , and the corresponding inverted index is established after the string is participle.

37.query string, _all metadata

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.