Elasticsearch error: cluster_block_exception [FORBIDDEN/12/index read-only / allow delete (api)], flood stage disk watermark exceeded

This happens when Elasticsearch thinks the disk is running low on space so it puts itself into read-only mode. By default Elasticsearch’s decision is based on the percentage of disk space that’s free, so on big disks this can happen even if you have many gigabytes of free space. The flood stage watermark is 95% … Read more

List all indexes on ElasticSearch server?

For a concise list of all indices in your cluster, call curl http://localhost:9200/_aliases this will give you a list of indices and their aliases. If you want it pretty-printed, add pretty=true: curl http://localhost:9200/_aliases?pretty=true The result will look something like this, if your indices are called old_deuteronomy and mungojerrie: { “old_deuteronomy” : { “aliases” : { … Read more

Make elasticsearch only return certain fields?

Yep, Use a better option source filter. If you’re searching with JSON it’ll look something like this: { “_source”: [“user”, “message”, …], “query”: …, “size”: … } In ES 2.4 and earlier, you could also use the fields option to the search API: { “fields”: [“user”, “message”, …], “query”: …, “size”: … } This is … Read more

Elasticsearch query to return all records

I think lucene syntax is supported so: http://localhost:9200/foo/_search?pretty=true&q=*:* size defaults to 10, so you may also need &size=BIGNUMBER to get more than 10 items. (where BIGNUMBER equals a number you believe is bigger than your dataset) BUT, elasticsearch documentation suggests for large result sets, using the scan search type. EG: curl -XGET ‘localhost:9200/foo/_search?search_type=scan&scroll=10m&size=50’ -d ‘ … Read more

Solr vs. ElasticSearch [closed]

Update Now that the question scope has been corrected, I might add something in this regard as well: There are many comparisons between Apache Solr and ElasticSearch available, so I’ll reference those I found most useful myself, i.e. covering the most important aspects: Bob Yoplait already linked kimchy’s answer to ElasticSearch, Sphinx, Lucene, Solr, Xapian. … Read more