The difference between the tickets is that I have intentionally specified size parameter. Index contains little more than 8 billions of documents. Here's my query:
size: 5000 only returns 5000 documents in the search response (which also is a lot and you should consider using scroll searches). However in order to get those 5000 documents the script score query needs to be executed against every hit that matches the query in the function score, which may be far more than those 5k.
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.