Using the scan method: how to add preserve_order=True?
See original GitHub issueI need to scan through all the documents in a DocType, while preserving the order in which they were added to it.
I logically turned to the scan
method, but that does not preserve the order.
The elasticsearch-py scan
helper method can take a preserve_order
argument. But I can’t figure out how to use it with elasticsearch-dsl-py.
Is it possible?
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Preserver Order in Testng - Selenium Easy
By default preserve-order is set to 'False', which executes your tests in Alphabetical order of your test/method names. When you set preserve-order to...
Read more >Preserve-order at method level - Google Groups
In TestNG,how do we use preserve-order at the method level? I want methods to be executed in the sequence I have specified. Using...
Read more >Working with scans in DynamoDB - AWS Documentation
You first use Scan with ConsistentRead set to true to obtain a consistent copy of the data in the table. During the Scan...
Read more >scan - fastlane docs
The easiest way to run tests of your iOS and Mac app. scan makes it easy to run tests of your iOS and...
Read more >How To Set Test Case Priority In TestNG With Selenium
Now ideally, the test methods should have been executed in alphabetical order since they all had a default priority of 0 assigned. So, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jaisharma639 regular sorting should work for you then:
Search().sort('my_field').param(preserve_order=True).scan()
You can do it by specifying params method, anything passed there will be used as a kwargs when calling the underlying method (
client.search
or, in this case,helpers.scan
):hope this helps.