Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate ids in percolator results #5840

Closed
cjbottaro opened this issue Apr 16, 2014 · 1 comment
Closed

Duplicate ids in percolator results #5840

cjbottaro opened this issue Apr 16, 2014 · 1 comment
Assignees

Comments

@cjbottaro
Copy link

If you index the same percolator query twice without a refresh in between, then it will show up twice in the percolator results. Also, the percolator count API will return the wrong number of results (will return 2).

Here is a test case showing the issue (uses the Elasticsearch Ruby gem):
https://gist.github.com/cjbottaro/10920007

@martijnvg martijnvg self-assigned this Apr 17, 2014
@martijnvg
Copy link
Member

Thanks for reporting this bug! This bugs manifests if filter, query, facet or aggs is specified in the percolate request.

When any of the above features is used, the persisted queries stored as documents in the shard (Lucene index) are used. Deleted documents usually stay around on disk before being being purged.
The issue here is that percolator isn't taking deleted docs into account, which it should. This is why the old version of your percolator query with id query1 is also reported as a match, which a duplicate.

martijnvg added a commit to martijnvg/elasticsearch that referenced this issue Apr 24, 2014
@martijnvg martijnvg removed bug labels May 8, 2014
martijnvg added a commit that referenced this issue May 8, 2014
…n running in near realtime mode.

This bug only occurs in non-realtime mode when query, filter, facet or aggs is used.

Closes #5843
Closes #5840
martijnvg added a commit that referenced this issue May 8, 2014
…n running in near realtime mode.

This bug only occurs in non-realtime mode when query, filter, facet or aggs is used.

Closes #5843
Closes #5840
martijnvg added a commit that referenced this issue May 8, 2014
…n running in near realtime mode.

This bug only occurs in non-realtime mode when query, filter, facet or aggs is used.

Closes #5843
Closes #5840
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
…n running in near realtime mode.

This bug only occurs in non-realtime mode when query, filter, facet or aggs is used.

Closes elastic#5843
Closes elastic#5840
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
…n running in near realtime mode.

This bug only occurs in non-realtime mode when query, filter, facet or aggs is used.

Closes elastic#5843
Closes elastic#5840
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants