I am doing some performance testing on Elasticsearch. So I am comparing Oracle db with Elasticsearch.
The Oracle query is able to stop it's search once it finds the first 10matches by using the code
select * from mtd_sec_data
WHERE current_sighting_status= 'ACT'
fetch first 10 rows only;
I want to do similar action in Elasticsearch too. Any help is appreciable.
Even after testing the script it is having a similar throughput as in without using terminate_after. Does this really stops searching once it finds the first 10hits or is it searching the entire index?
It has around 536 hits and the index contains 1000docs.
Probably not a great benchmark on that sort of volume. Most of the time spent will be in JSON parsing/rendering, returning those 10 docs source. The matching part which is searching for a single search term with only ~500 uses will be a small part of the overall cost.
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.