I've just started playing with Elastic Search and I'm very impressed.
I've been a compass users for a number of years and I'm starting to
like ES even more. Great job, and thanks.
So, I've managed to get up and running and got my data indexed but
experiencing unexpected behaviour with the Java search API. Here's my
query:
I'd expect the setFrom and setSize to limit the hits array to length
10, but I'm getting all of them (same as getTotalHits(), which is 25
in my test case). If I change the from parameter to, say 5, I now get
2 for the length of the hit array. In both cases I'd expect an array
of length 10.
So, in short, am I miss understanding the purpose of from and size,
and if so how do I implement pagination with the Java API, or have I
hit on a bug?
I've just started playing with Elastic Search and I'm very impressed.
I've been a compass users for a number of years and I'm starting to
like ES even more. Great job, and thanks.
So, I've managed to get up and running and got my data indexed but
experiencing unexpected behaviour with the Java search API. Here's my
query:
I'd expect the setFrom and setSize to limit the hits array to length
10, but I'm getting all of them (same as getTotalHits(), which is 25
in my test case). If I change the from parameter to, say 5, I now get
2 for the length of the hit array. In both cases I'd expect an array
of length 10.
So, in short, am I miss understanding the purpose of from and size,
and if so how do I implement pagination with the Java API, or have I
hit on a bug?
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.