Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exclude some indexes from elasticsearch query

I am using _all as index pattern and this causes kibana-4 to search every possible index. As kibana-4 has its own .kibana index, it tries to search for the required data in .kibana index and since it doesn't parse the data there it throws some parsing exceptions. So Is there any way by which I can configure kibana-4 to exclude .kibana for searching..

like image 580
Shubham Mishra Avatar asked May 01 '15 07:05

Shubham Mishra


People also ask

How do I delete a specific index in Elasticsearch?

To delete the index, you must roll over the data stream so a new write index is created. You can then use the delete index API to delete the previous write index.

Is it safe to delete indices in Elasticsearch?

you can freely delete your indexes (from the indexes panel) in either graylog or elasticsearch, just recalculate your indexes after. you may want to update your retention policy to fit your storage availability. I would rotate them based on space, and then only keep the number of indexes you have room for.

Can index have multiple types Elasticsearch?

From Elasticsearch version 6.0 by default index doesn't allow multiple types per index. The better option is to always have one document type per index. The single responsibility of the index is to maintain the single document type/mapping type per index.


1 Answers

I was able to successfully ignore the .kibana index by using the following request:

curl 'localhost:9200/*,-*kibana/_search?q=*:*'

This will search all indices (the first "*") excluding all indices that end with "kibana".

like image 139
Lee H Avatar answered Dec 04 '22 06:12

Lee H