Simon,
It makes sense to explicitly call the refresh. If you look at my gist, I
am doing that with the 3rd record. When I explictly call the refresh, the
search always return.
It also makes sense that a refresh that is triggered intravenously through
the use of the refresh_interval could actually take longer than the 500ms
that it is triggered with. However in my test, I have the refresh interval
set to 500ms and I am pausing for 5 seconds and the search is not coming
back. I have actually seen the same thing happen when pausing for 10
seconds. Then after waiting for 5 or 10 seconds, searching, and then
immediately searching again and then getting the results is not right. I
could see the search not returning in 600ms, but 10s later on a new index
which I just created or with no other things going on with the cluster, it
seems like something is wrong.
Note: I am only seeing the problem on a cluster which can support a
replicas count of 2 for the index. It seems like in the round-robin search
approach, that the first /shard/replica that it is searching hasn't been
indexed while the second searched shard/replica does have it indexed.
After 10 seconds though, I don't know why everything wouldn't be indexed on
the cluster though.
Amos
On Friday, March 1, 2013 3:22:05 AM UTC-6, simonw wrote:
On Friday, March 1, 2013 4:24:11 AM UTC+1, amos.wood wrote:
Here is my search use case which seems to be failing periodically:
- Create an index with a 500ms refresh interval
- Write a document to an index
- Pause for between 500ms and 5s
- Attempt to search for a value in 1 field
- Attempt to search again for the same value in the same field
In my attempt to search, sometimes I am getting back no results on the
first try with the second search attempt succeeding. Other times, I am
getting back results on both searches. Even more strange, sometimes I get
back a result on the first search but not on the second search. Does
anyone know what may be going on?
Hey,
the refresh_interval is not guaranteeing to make results visible 500ms
after you write the document to the index. it depends on many things like
how long it takes the do the refresh etc. so the interval can be higher in
practice. If you want to run this testcase you should make sure to call
refresh explicitly via the rest API to make sure that everything has been
refreshed.
simon
I have a gist script which will simulate the issue. I could run this
gist on our production environment cluster and see the issue happen about
every other run. When I run it on our sandbox environment, I cannot
reproduce the issue.
ElasticSearch Script to mimic Real Time Search. However, periodically it doesn't return any search results after waiting even an extra amount of time. · GitHub
Production Cluster Configuration:
Elasticsearch Version 0.19.4
1 Master Non Data Node
1 Master Data Node
6 Data Nodes
All VM servers with 4 CPUs with 18GB memory.
Sandbox Cluster Configuration:
Elasticsearch Version 0.19.4
2 Master Data Nodes
Both VM servers with 2 CPUs with 8GB memory.
On Friday, March 1, 2013 3:22:05 AM UTC-6, simonw wrote:
On Friday, March 1, 2013 4:24:11 AM UTC+1, amos.wood wrote:
Here is my search use case which seems to be failing periodically:
- Create an index with a 500ms refresh interval
- Write a document to an index
- Pause for between 500ms and 5s
- Attempt to search for a value in 1 field
- Attempt to search again for the same value in the same field
In my attempt to search, sometimes I am getting back no results on the
first try with the second search attempt succeeding. Other times, I am
getting back results on both searches. Even more strange, sometimes I get
back a result on the first search but not on the second search. Does
anyone know what may be going on?
Hey,
the refresh_interval is not guaranteeing to make results visible 500ms
after you write the document to the index. it depends on many things like
how long it takes the do the refresh etc. so the interval can be higher in
practice. If you want to run this testcase you should make sure to call
refresh explicitly via the rest API to make sure that everything has been
refreshed.
simon
I have a gist script which will simulate the issue. I could run this
gist on our production environment cluster and see the issue happen about
every other run. When I run it on our sandbox environment, I cannot
reproduce the issue.
ElasticSearch Script to mimic Real Time Search. However, periodically it doesn't return any search results after waiting even an extra amount of time. · GitHub
Production Cluster Configuration:
Elasticsearch Version 0.19.4
1 Master Non Data Node
1 Master Data Node
6 Data Nodes
All VM servers with 4 CPUs with 18GB memory.
Sandbox Cluster Configuration:
Elasticsearch Version 0.19.4
2 Master Data Nodes
Both VM servers with 2 CPUs with 8GB memory.
On Friday, March 1, 2013 3:22:05 AM UTC-6, simonw wrote:
On Friday, March 1, 2013 4:24:11 AM UTC+1, amos.wood wrote:
Here is my search use case which seems to be failing periodically:
- Create an index with a 500ms refresh interval
- Write a document to an index
- Pause for between 500ms and 5s
- Attempt to search for a value in 1 field
- Attempt to search again for the same value in the same field
In my attempt to search, sometimes I am getting back no results on the
first try with the second search attempt succeeding. Other times, I am
getting back results on both searches. Even more strange, sometimes I get
back a result on the first search but not on the second search. Does
anyone know what may be going on?
Hey,
the refresh_interval is not guaranteeing to make results visible 500ms
after you write the document to the index. it depends on many things like
how long it takes the do the refresh etc. so the interval can be higher in
practice. If you want to run this testcase you should make sure to call
refresh explicitly via the rest API to make sure that everything has been
refreshed.
simon
I have a gist script which will simulate the issue. I could run this
gist on our production environment cluster and see the issue happen about
every other run. When I run it on our sandbox environment, I cannot
reproduce the issue.
ElasticSearch Script to mimic Real Time Search. However, periodically it doesn't return any search results after waiting even an extra amount of time. · GitHub
Production Cluster Configuration:
Elasticsearch Version 0.19.4
1 Master Non Data Node
1 Master Data Node
6 Data Nodes
All VM servers with 4 CPUs with 18GB memory.
Sandbox Cluster Configuration:
Elasticsearch Version 0.19.4
2 Master Data Nodes
Both VM servers with 2 CPUs with 8GB memory.
On Friday, March 1, 2013 3:22:05 AM UTC-6, simonw wrote:
On Friday, March 1, 2013 4:24:11 AM UTC+1, amos.wood wrote:
Here is my search use case which seems to be failing periodically:
- Create an index with a 500ms refresh interval
- Write a document to an index
- Pause for between 500ms and 5s
- Attempt to search for a value in 1 field
- Attempt to search again for the same value in the same field
In my attempt to search, sometimes I am getting back no results on the
first try with the second search attempt succeeding. Other times, I am
getting back results on both searches. Even more strange, sometimes I get
back a result on the first search but not on the second search. Does
anyone know what may be going on?
Hey,
the refresh_interval is not guaranteeing to make results visible 500ms
after you write the document to the index. it depends on many things like
how long it takes the do the refresh etc. so the interval can be higher in
practice. If you want to run this testcase you should make sure to call
refresh explicitly via the rest API to make sure that everything has been
refreshed.
simon
I have a gist script which will simulate the issue. I could run this
gist on our production environment cluster and see the issue happen about
every other run. When I run it on our sandbox environment, I cannot
reproduce the issue.
ElasticSearch Script to mimic Real Time Search. However, periodically it doesn't return any search results after waiting even an extra amount of time. · GitHub
Production Cluster Configuration:
Elasticsearch Version 0.19.4
1 Master Non Data Node
1 Master Data Node
6 Data Nodes
All VM servers with 4 CPUs with 18GB memory.
Sandbox Cluster Configuration:
Elasticsearch Version 0.19.4
2 Master Data Nodes
Both VM servers with 2 CPUs with 8GB memory.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.