Skip to main content

ElasticSearch

Settings Scripts


Get Settings For Index (including the analyzers)

GET ${indexName}/_settings

Get Mapping For Index (including the fields)

GET ${indexName}/_mapping

Get Stats For Index

GET ${indexName}/_stats

Index/Read/Update/Delete Scripts


Create Index


Index Single Value

POST ${indexName}/_doc/ 
{
"title": "Something To Treasure"
}

Bulk Index

POST ${indexName}/_bulk
{ "index": {} }
{ "title": "Magnavox" }
{ "index": {} }
{ "title": "Multivox"}

Read Single Value

GET ${indexName}/_doc/hc_3mYMBbVzBDYKV_8WP

Update Single Value

POST ${indexName}/_update/hc_3mYMBbVzBDYKV_8WP 
{
"doc": {
"title": "Something To Treasure"
}

Delete Single Value

DELETE search-trademark-names/_doc/DUQRm4MBgeBxdUf1P8Th

Delete All Entries In Index

POST ${indexName}/_delete_by_query
{
"query": {
"match_all": {}
}
}
  • Note: This will not free up the disk space.

Delete Entire Index

DELETE ${indexName}