I am an ES novice and I would be thankful if anyone would help with my 'silly' question.
How can I set my search preference using Python API ? Specifically, I need to specify the shard at each request. I can't find any example around..
What I am looking exactly to do is what "slice" does, but since I 'am working on 1.7 it's not available.
search preference is not doing what the sliced scroll does. You still need to use a scroll request on 1.7 and live with less performance than a sliced scroll unless you upgrade (which you now have a great reason to!
Actually this is exactly what I was doing, scrolling over each shard in order to simulate the sliced scroll though a slice == a shard is the finest (smallest) I can get.
I have already found the syntax for the python API and here's and example for doing a scroll over shard number 2:
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.