Elasticsearch list indices sorted by name

You can ask ES to sort the results via the s (sort) searchParameter using s=i or s=index curl “localhost:9200/_cat/indices?pretty&s=i” curl “localhost:9200/_cat/aliases?pretty&s=index” To see the column’s headers, add “&v” : curl “localhost:9200/_cat/indices?pretty&v&s=index”`. You can find some explanations in the cat/indices documentation

Querystring search on array elements in Elastic Search

For that requirement to be achieved, you need to look at nested objects, not to query a flattened list of values but individual values from that nested object. For example: { “mappings”: { “people”: { “properties”: { “name”: { “type”: “string” }, “quotations”: { “type”: “nested”, “properties”: { “value”: { “type”: “string” } } } …

Read more

How to update a field type in elasticsearch

You need to define a mapping using Put Mapping API. curl -XPUT ‘http://localhost:9200/twitter/_doc/_mapping’ -H ‘Content-Type: application/json’ -d ‘ { “_doc” : { “properties” : { “message” : {“type” : “text”, “store” : true} } } } ‘ A date can be defined as follow: curl -XPUT ‘http://localhost:9200/twitter/_doc/_mapping’ -H ‘Content-Type: application/json’ -d ‘ { “_doc” : …

Read more

How to Do a Mapping of Array of Strings in Elasticsearch

In Elasticsearch, there is no dedicated array type. Any field can contain zero or more values by default, however, all values in the array must be of the same datatype. So you don’t have to specify anything specific in the mapping to store an array of values. For more information look at: https://www.elastic.co/guide/en/elasticsearch/reference/current/array.html

ElasticSearch vs SQL Full Text Search [closed]

Define “better”… sql full text search is fairly trivial to get working (indexing and query) – but it has penalties: very little (virtually no) control over how things are indexed (what the index keys are; what the lexers/stemmers/etc are; etc) runs on the sql server – which is usually your least scalable infrastructure Elastic search …

Read more