getTotalHits isn't the same on the same search

On few sequential search requests getTotalHits returns different values.
Why?
Of course, there wasn't any indexing between requests.More over, there
wasn't any indexing since ES start :slight_smile:

--
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.

I've seen that in the past on a cluster with 2 nodes having shards with not the same number of docs due to a split brain issue.
Do you have one node or many?

Check number of docs per shard and look if there is a difference between primary and replicas.

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 23 juil. 2013 à 12:19, Andrew Gaydenko andrew.gaydenko@gmail.com a écrit :

On few sequential search requests getTotalHits returns different values. Why?
Of course, there wasn't any indexing between requests.More over, there wasn't any indexing since ES start :slight_smile:

--
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.

On Tuesday, July 23, 2013 2:31:44 PM UTC+4, David Pilato wrote:

I've seen that in the past on a cluster with 2 nodes having shards with
not the same number of docs due to a split brain issue.
Do you have one node or many?

Check number of docs per shard and look if there is a difference between
primary and replicas.

I play with the only node with

index.number_of_shards: 1
index.number_of_replicas: 0

in config.

--
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.

That should not happen with the same exact query with no indexing / refreshing in the mean time.

What does your query look like?

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 23 juil. 2013 à 12:44, Andrew Gaydenko andrew.gaydenko@gmail.com a écrit :

On Tuesday, July 23, 2013 2:31:44 PM UTC+4, David Pilato wrote:
I've seen that in the past on a cluster with 2 nodes having shards with not the same number of docs due to a split brain issue.
Do you have one node or many?

Check number of docs per shard and look if there is a difference between primary and replicas.

I play with the only node with

index.number_of_shards: 1
index.number_of_replicas: 0

in config.

--
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.

On Tuesday, July 23, 2013 2:52:59 PM UTC+4, David Pilato wrote:

That should not happen with the same exact query with no indexing /
refreshing in the mean time.

You are absolutely right! It is my fault - the reason is in my code.
Please, forgive me.

--
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.