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

Error executing must_not queries on sharded index #2926

Closed
lmenezes opened this issue Apr 22, 2013 · 4 comments
Closed

Error executing must_not queries on sharded index #2926

lmenezes opened this issue Apr 22, 2013 · 4 comments

Comments

@lmenezes
Copy link
Contributor

Running this in 0.90.0 RC2(also latest build) fails with:

Query Failed [Failed to execute main query]]; nested: ElasticSearchIllegalArgumentException[Not distributed collection statistics for field: description]; "}]}

Works fine in 0.20.4.

Also works if using only one shard, or if changing the must_not query for a must query.

curl -XPOST http://localhost:9200/test -d '{"settings": { "index.number_of_replicas": 0, "index.number_of_shards": 2}}'

curl -XPOST http://localhost:9200/test/test/1 -d '{"id":1,"description":"foo other anything bar"}'
curl -XPOST http://localhost:9200/test/test/2 -d '{"id":2,"description":"foo other anything"}'
curl -XPOST http://localhost:9200/test/test/3 -d '{"id":3,"description":"foo other"}'

curl -XPOST http://localhost:9200/test/test/_search?search_type=dfs_query_then_fetch -d '{ "query": { "bool": { "must_not": [ { "match": { "description": { "query": "anything", "type": "boolean", "operator": "AND" } } } ] } }}'
@ghost ghost assigned s1monw Apr 23, 2013
@s1monw
Copy link
Contributor

s1monw commented Apr 23, 2013

thanks for reporting this. This is actually caused by a change in Lucene that doesn't return terms for must_not clauses. I need to think a bit how to fix that but short term you can just use non-dfs search type?

@lmenezes
Copy link
Contributor Author

Well, We are not going live with 0.90 until the GA is out. So, if this is going to be fixed before 0.90 GA We will just wait. Otherwise, We would be willing to drop DFS queries until this is solved. Any plans for solving that before the GA?

@s1monw
Copy link
Contributor

s1monw commented Apr 23, 2013

@lmenezes I hope I will get a fix today! :)

@lmenezes
Copy link
Contributor Author

Oh, nice! I will just wait then. Changing to non DFS breaks a lot of our unit tests. Also, We are still waiting on another bug reported a few days ago(#2920). thanks for the fast reply

s1monw added a commit to s1monw/elasticsearch that referenced this issue Apr 23, 2013
@s1monw s1monw closed this as completed in c884304 Apr 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants