Hello,
Does the reindex save the original order of the documents?
Does the answer the same when using slice?
Thank you!
Hello,
Does the reindex save the original order of the documents?
Does the answer the same when using slice?
Thank you!
You'd have to use a sort if you care about order. If you slice the results are sliced semi-randomly and then sorted and then indexed.
If you don't sort reindex will come back in a fairly undefined order. It uses _doc
order, which is just the fastest order it can manage. So the order is based on how things happen to be one disk. It might not have anything to Do with the order you sent them in.
thank you @nik9000
the docs says its deprecated, so I wonder if it matters for performance of time series queries- to keep it's original ingest order
also slice and sort will not work together right?
thanks a lot.
We don't keep docs in the order you sent them. Well, they can get.pretty jumbled and we don't prevent that.
It does help in time series searches to have the index in sorted order - you can set the index to sort on any field you like. That will slow down writes some and should speed up some queries. It's not on by default.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
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.