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

Query for nested values, not documented. #68

Open
EarthlingDavey opened this issue Jun 13, 2019 · 1 comment
Open

Query for nested values, not documented. #68

EarthlingDavey opened this issue Jun 13, 2019 · 1 comment

Comments

@EarthlingDavey
Copy link

Hi,

I'm hitting a brick wall here, so any help would be appreciated. I have data like this:

"_source": {
  "ItemName": "test title 4",
  "ItemBody": "The description",
  "ItemAttributes": {
    "colour": [
      "blue",
      "red"
    ],
    "size": [
      "s"
      "m"
      "l"
    ]
  }
},

Is there a way to query this data, without using the dot notation, like I've tried (below). The dot is not a vilid field name, so the query doesn't work.

search(
  body: {
    query: {
        match : { ItemAttributes.colour : "blue"  } 
    }
  }
)

Thanks in advance. Davey

@vojtatranta
Copy link

Yeah, this does not work it would be super cool to make ti work!

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