Files
kustomize/api/internal/crawl/search_cmds/misc.md
2020-01-17 13:15:49 -08:00

734 B

Check the health status of an ElasticSearch cluster:

curl -X GET "${ElasticSearchURL}:9200/_cat/health?v&pretty"

Check the indices in an ElasticSearch cluster:

curl "${ElasticSearchURL}:9200/_cat/indices?v"

Get the mapping of the index:

curl -X GET "${ElasticSearchURL}:9200/${INDEXNAME}/_mapping?pretty"

Delete the kustomize index from the ElasticSearch cluster (Use this command with caution):

curl -X DELETE "${ElasticSearchURL}:9200/${INDEXNAME}?pretty"

Add a new field into an existing index.

curl -X PUT "${ElasticSearchURL}:9200/${INDEXNAME}/_mapping/_doc?pretty" -H 'Content-Type: application/json' -d'
{
  "properties": {
    "fileType": {
      "type": "keyword"
    }
  }
}
'