Batch Build Index:
Curl-s-xpost ' Localhost:9200/_bulk '--data-binary @documents. JSON
Paging:
From, size
Back to version:
"Version": True
To limit the result set with a score:
"Min_score": 0.75
Field:* return all fields
_source field:
When requesting a field that is not stored, this field is extracted from the _source field (additional processing is required); Returning the _source field performs better than returning multiple storage fields
Partial fields: (Exclude fields)
"Partial_fields": {"Partial1": {"include": [' titl* '], "exclude": ["chara*"]}}
Script fields:
{"Scirpt_fields": {"correctyear": {"script": "doc[' Year '].value-1800"}}} or "Script": "_source.year-1800" (Save memory, support more complex field values)
Pass parameter to script: "params": {"paramyear": 1800} then "script": "_source.year-paramyear"}
Search Execution Preferences: (Control which shards to execute queries on, such as: _primary, _primary_first, _shards)
Curl-xget ' localhost:9200/library/_search?preference=_local '-D JSON
Search Shard API: (This API allows you to check the shards that will execute the query)
Curl-xget ' Localhost:9200/library/_search_shards?pretty '-D JSON
Weighted query:
"title": {"value": "Crime", "Boost": 10.0}
Multi-entry query:
"Terms": {"title": [' book ', ' novel '], "Minimum_match": 1
Term query does not parse, match query analysis,
Multi_search query: (Query on multiple fields)
Elasticsearch Study Notes (i)