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

Some queries should support multiple fields #49

Open
mvar opened this issue Dec 21, 2015 · 3 comments
Open

Some queries should support multiple fields #49

mvar opened this issue Dec 21, 2015 · 3 comments
Assignees
Labels

Comments

@mvar
Copy link
Member

mvar commented Dec 21, 2015

I have tested range query and found out that it works with multiple fields (tested with ES 2.1.1). This library does not support that.

Example:

{
    "range": {
        "price": {
            "gt": 50
        },
        "title": {
            "gt": "ccc"
        }
    }
}

Currently if you want to achieve something like that using our library you need to create two range queries and put them into bool.

We should check how many queries support multiple fields and think how we could add support for it.

Edit: prefix and regexp queries also supports multiple fields (tested on ES 2.1.1).

@mvar mvar added the question label Dec 21, 2015
@saimaz saimaz added this to the 1.2.0 milestone Dec 28, 2015
@saimaz saimaz added planned and removed question labels Jun 26, 2016
@einorler
Copy link
Member

Hi @mvar ,
I've been checking out these and some other queries on this functionality and in reality it seems that there are quite a few queries that can accept multiple fields, however, that does not mean that they work correctly with them. My tests show that if multiple fields are provided to these queries the results will come out only for the last field that was specified, that is if i would have such a query:

{
  "query": {
    "range": {
      "age": {
        "gte": 30,
        "lte": 40
      },
      "price": {
        "gte": 10,
        "lte": 30
      }
    }
  }
}

I would only get results for price and the age field would be ignored.

@mvar
Copy link
Member Author

mvar commented Jul 22, 2016

@einorler I think in such case you should open issue in Elasticsearch repository.

@einorler
Copy link
Member

@saimaz saimaz removed this from the v1.2.0 milestone Sep 7, 2016
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

3 participants