es query three methods

ES query 3 methods:

method one:

Precise query by id:

Knowledge for example:

curl -XGET 'HTTP://192.168.100.60:9200/index_primary_whole/std_index/253fa79b377709705b2086c124cbd478?pretty'

 

Description: The pretty parameter indicates that it is displayed in json format

 

Method 2:

Precise query based on a field:

curl -XGET 'HTTP://192.168.100.60:9200/index_primary_whole/std_index/_search?pretty&q=sqid:ea6d9bc646673c91558b9757c7afad37'

Description: Use & symbol link between multiple conditions

 

 

Method 3:

Precise query based on a field:

curl -XGET 'HTTP://192.168.100.60:9200/index_primary_whole/std_index/_search?pretty' -d '{"query":{"term":{"sqid":"ea6d9bc646673c91558b9757c7afad37"}}}'

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324884839&siteId=291194637