1

I have field hcc_member_id as of Integer type. I want to perform range query on this field. I tried queries given in the ES documentation, but it does not seem to work. No matter what the query is it always returns same response.

I think I am doing things in a wrong way but not able to identify the problem. Any help is good.

enter image description here

2 Answers 2

1

You should use POST instead of GET. Otherwise your Json will be ignored.

Furtermore you should add a "query" field to our json: (without query you will get something like No parser for element [range]])

{
  "query": {
    "range": {
      "hc_member_id": {
        "gte": 1000
      }
    }
  }
}
Sign up to request clarification or add additional context in comments.

4 Comments

exactly what i post 15 minutes ago ;) thanks for specifing this "You should use POST instead of GET. Otherwise your Json will be ignored."
I'll delete my answer. I haven't see our answer when I start writing mine.
keep it, you explain very well why get don't work in this case
I will expect this answer as it has explanation too :) Thanks @AlainIb too
1

this is a working (for me) query

//EDIT // IT WORK ONLY IN POST NOT GET

{
    "query" : {
        "range" : {
            "hcc_member_id" : {
                "gte" : 1000
            }
        }
    }
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.