The track_total_hits is in ES 7, and so is in this lib doc, but I can鈥檛 figure out to use it
Search(track_total_hit=True)
Throws : Super(Search,self).__init__(**kwargs) got en unexpected keyword
I think it鈥檚 because the super init has no kwargs and only 3 required param but how to use it so ?
Ow I think I get it, I brain myself between elastic and elastic-dsl docs, it's in the basic one that track_total_hit is implemented, I'll try it tomorrow ^^
the proper solution is:
s = Search()
s = s.extra(track_total_hits=True)
Hope this helps!
This should really be mentioned in the docs here (or somewhere else obvious). We spend much too much time wondering why we were only getting a max 10,000 hits
@miff2000 I would accept a PR documenting this.
@sethmlarson I've put in the PR mentioned above. I added under the Hits section instead as it's the hit total that's affected by it
Most helpful comment
the proper solution is:
Hope this helps!