We query elastic search using node but the thing is we do have preference parameter in our queries as we don't have an idea which value will be the best to use for preference as shards are managed by the elasticsearch so what can be a general value we can use with every query to elasticsearch for prefrence that result in good performance. Right now we are using undefined for prefrence.
I am looking into the documentation the possible value for prefrence
_local
_only_local
but here they say The operation will be executed on shards allocated to the local node what is mean by local node here ?
we were looking how kibana is making request to the elasticsearch ..... it was using prefrence parameter in it even though it's value keeps on changing so we were just wondering may be it can affect performance somehow.
Kibana uses preference to improve consistency across the many requests it fires off in parallel. This means that all requests grouped together will be served by the same set of shards.
If you do not have a similar reason to use preference, do not use it. It is after all an optional feature.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.