I've just started to play with elasticsearch and I wanted to write
basic java unit tests for testing the core functionality of
elasticsearch.
I created a local node with nodebuilder
(nodeBuilder().local(true).settings(settings).node()) for my unit
tests and inserted some test data into it and I wanted to test the
query functionalities, how it is work.
At every insert function I set the refresh(true) property and most of
the queries worked fine from unit test (query for field, wildcard
queries, etc...) right after the insertion.
However when I searched with a queryString which contained a
rangeQuery (for date) then it most of the times returned with empty
resultset and sometimes it returned with the correct resultset.
When I started to play with the different settings then I found out,
if I force elasticsearch to flush data then rangeQuery always gave me
back the correct resultset.
I'm wondering why this happened and why just range queries were
affected.
Can anybody explain me, why this happened?
On Wednesday, June 8, 2011 at 12:28 PM, Tamás wrote:
Hi,
I've just started to play with elasticsearch and I wanted to write
basic java unit tests for testing the core functionality of
elasticsearch.
I created a local node with nodebuilder
(nodeBuilder().local(true).settings(settings).node()) for my unit
tests and inserted some test data into it and I wanted to test the
query functionalities, how it is work.
At every insert function I set the refresh(true) property and most of
the queries worked fine from unit test (query for field, wildcard
queries, etc...) right after the insertion.
However when I searched with a queryString which contained a
rangeQuery (for date) then it most of the times returned with empty
resultset and sometimes it returned with the correct resultset.
When I started to play with the different settings then I found out,
if I force elasticsearch to flush data then rangeQuery always gave me
back the correct resultset.
I'm wondering why this happened and why just range queries were
affected.
Can anybody explain me, why this happened?
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.