Slicing without point in time

When you specify "slices" for a search request, you will receive an error if the search is not a point-in-time or scrolled query: "[slice] can only be used with [scroll] or [point-in-time] requests".

I don't quite understand this limitation. I assume that slicing utilizes "_shard_doc" if no slice field is specified, and that it could be performance prohibitive to use "_id" instead. But if "field" is specified on the slice, I don't see why PIT/scroll would matter...

Relatedly, when specifying a "field," I don't understand the recommendation:

The same point-in-time ID should be used for all slices. If different PIT IDs are used, then slices can overlap and miss documents. This is because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index.

From testing, it appears that when a field is specified, the slice is deterministic simply based on the value of the field, regardless of PIT ID. I have had success using different PIT IDs to slice through the entire document set without gaps/duplicates, but am wondering if this behavior can be relied upon given that it is not documented...

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.