Remove a field from a Elasticsearch document

What @backtrack told is true , but then there is a very convenient way of doing this in Elasticsearch. Elasticsearch will abstract out the internal complexity of the deletion. You need to use update API to achieve this – curl -XPOST ‘localhost:9200/test/type1/1/_update’ -d ‘{ “script” : “ctx._source.remove(\”name_of_field\”)” }’ You can find more documentation here. Note: … Read more

ElasticSearch find disk space usage

The Elasticsearch way to do this would be to use _cat/shards and look at the store column: curl -XGET “http://localhost:9200/_cat/shards?v” index shard prirep state docs store ip node myindex_2014_12_19 2 r STARTED 76661 415.6mb 192.168.1.1 Georgianna Castleberry myindex_2014_12_19 2 p STARTED 76661 417.3mb 192.168.1.2 Frederick Slade myindex_2014_12_19 2 r STARTED 76661 416.9mb 192.168.1.3 Maverick myindex_2014_12_19 … Read more

elasticsearch match vs term query

Assuming you are using the Standard Analyzer GET becomes get when stored in the index. The source document will still have the original “GET”. The match query will apply the same standard analyzer to the search term and will therefore match what is stored in the index. The term query does not apply any analyzers … Read more

Elasticsearch : Root mapping definition has unsupported parameters index : not_analyzed

You’re almost here, you’re just missing a few things: PUT /test { “mappings”: { “type_name”: { <— add the type name “properties”: { <— enclose all field definitions in “properties” “field1”: { “type”: “integer” }, “field2”: { “type”: “integer” }, “field3”: { “type”: “string”, “index”: “not_analyzed” }, “field4,”: { “type”: “string”, “analyzer”: “autocomplete”, “search_analyzer”: “standard” … Read more

Elasticsearch 2.1: Result window is too large (index.max_result_window)

If you need deep pagination, one possible solution is to increase the value max_result_window. You can use curl to do this from your shell command line: curl -XPUT “http://localhost:9200/my_index/_settings” -H ‘Content-Type: application/json’ -d ‘{ “index” : { “max_result_window” : 500000 } }’ I did not notice increased memory usage, for values of ~ 100k.

What is the difference between must and filter in Query DSL in elasticsearch?

must contributes to the score. In filter, the score of the query is ignored. In both must and filter, the clause(query) must appear in matching documents. This is the reason for getting same results. You may check this link Score The relevance score of each document is represented by a positive floating-point number called the … Read more