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

"matched_queries" does not include queries within a wrapper query #6871

Closed
tstibbs opened this issue Jul 15, 2014 · 0 comments
Closed

"matched_queries" does not include queries within a wrapper query #6871

tstibbs opened this issue Jul 15, 2014 · 0 comments
Assignees
Labels

Comments

@tstibbs
Copy link
Contributor

tstibbs commented Jul 15, 2014

I have a document in an index such that the following request returns a match, with the matched_queries element containing query1:

curl -XPOST 'http://localhost:9200/index/_search' –d '
{
  "query": {
    "match": {
      "stuff": {
        "_name": "query1",
        "query": "blah"
      }
    }
  }
}
'

However, if that query is wrapped in a wrapper query, then the name does not appear in the list of matched_queries:

curl -XPOST 'http://localhost:9200/index/_search' –d '
{
  "query": {
    "wrapper": {
      "query": "eyJtYXRjaCI6IHsic3R1ZmYiOiB7Il9uYW1lIjogInF1ZXJ5MSIsICJxdWVyeSI6ICJibGFoIn19fQ=="
    }
  }
}
'

I am using the java api and the WrapperQueryBuilder, but the effect is the same whether using the java api or the rest interface.

(gist with set-up steps in case it's useful: https://gist.github.com/tstibbs/645e01c5dcdfa9d2a193)

@jpountz jpountz removed the adoptme label Aug 1, 2014
martijnvg added a commit that referenced this issue Jan 7, 2015
martijnvg added a commit that referenced this issue Jan 7, 2015
martijnvg added a commit that referenced this issue Jan 7, 2015
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants