scan() does not give me all hits
See original GitHub issueHi! I’m using the scan method to retrieve a large number of search results
s = Search(using=connection, index=index, doc_type="doc")
q = Q({"multi_match": {"query": 'example_search', "fields": ['title', 'body'], "type":"phrase",
"minimum_should_match":"100%", "analyzer":'standard'}})
s = s.query(q)
hits = []
for hit in s.scan():
hits.append({"doc_id": hit.doc_id, "found_term": 'example_search'})
I currently have the impression that the scan search is not returning all hits from my index. I had a look at the documentation of elasticsearch_dsl and elasticsearch but I don’t really understand if there is a parameter I should change or pass (maybe the scrolling parameter?) in order to assure that all hits in all documents will be returned… Any ideas on what might cause the problem?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Music Library Scan doesn't capture all songs - KODI Forum
Hi everyone, i have some strange problem with the music library. If i select "Scan to library" on my music folder, XBMC starts...
Read more >9 reasons Why Your QR Code is Not Working - Beaconstac blog
Sometimes, scanning the QR Code can give you a warning message like “Please do not scan this QR Code again.”, which means it's...
Read more >Scanner in Java not working - Stack Overflow
When you type in, say, 5 and then hit Enter, the output is: nextInt() = 5 nextLine() = That is, nextLine() did not...
Read more >Best practices for querying and scanning data
This section covers some best practices for using Query and Scan operations in Amazon DynamoDB. Performance considerations for scans.
Read more >How to Scan a QR Code on Android and iOS | Digital Trends
1. Open up the Camera app. 2. If you don't see the QR code icon in your Control Center on iOS, then simply...
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
You can only iterate on the returned object once, if you want to iterate again you need to call
scan
again.@HonzaKral I’m using
Search()
andscan()
inside a function that is returning a result of the records. When I’m trying to iterate for the second time in the result, I’m not getting a result. Only for the first time works. Any ideas?