Sameera De Silva
Sameera De Silva

Reputation: 1980

Elasticsearch - is there an option or Flag to prevent indexes been searched using quires

I am doing an performance test for the querying using Esrally tool. But due to it's limitations , , when gave “index”: “_all”, it executes search queries on all the indices instead of search only the defined indices.

So there by, is there an option or Flag to prevent indexes been searched using quires ? I want to prevent highlighted indices from searching.

enter image description here

Upvotes: 0

Views: 80

Answers (1)

hamid bayat
hamid bayat

Reputation: 2179

you could use index.hidden: true option. it is static option, so you should close the indices first:

curl -s -XPOST "127.0.0.1:9200/elastalert/_close"

then

curl -s -XPUT "127.0.0.1:9200/elastalert/_settings?pretty" -d '
{ 
"index.hidden": true
}'

after that:

curl -s -XPOST "127.0.0.1:9200/elastalert/_open"

Upvotes: 1

Related Questions