Skip to content

Conversation

@r4sn4
Copy link

@r4sn4 r4sn4 commented Nov 4, 2016

Generalized numeric Range filter -

Following filter limits can be specified -

  1. greaterThan = i, lessThan = j
  2. greaterThan = i, lessThanOrEqual = j
  3. greaterThanOrEqual = i, lessThanOrEqual = j
  4. greaterThanOrEqual = i, lessThan = j
  5. greatherThan = i
  6. lessThan = i
  7. greaterThanOrEqual = i
  8. lessThanOrEqual = i

Filter range is specified in query like this -

curl -H "Content-Type:application/json" -d '{"item": "i1", "numericRangeFilter": [{"name":"price", "greaterThan":20, "lessThanOrOrEqual":90},{"name":"popRank, "greaterThan":2, "lessThan":19}]}' http://localhost:8000/queries.json

@r4sn4
Copy link
Author

r4sn4 commented Nov 4, 2016

For numericRangeFilter , mapping type of fields in Elastic Search should be double or so.

In UR all the fields are stored with mapping type string.

@pferrel
Copy link
Owner

pferrel commented Nov 4, 2016

Does this actually work? Not sure what your comment means.

@r4sn4
Copy link
Author

r4sn4 commented Nov 5, 2016

I am storing price as one of the item properties while setting items in
hbase using $set.

In order for this numeric range filte to work, I made some changes in
esClient.scala so that it stores mappingType of price as "double" in ES.

On Sat, Nov 5, 2016 at 6:45 AM, Rasna Tomar rasna.tomar@gmail.com wrote:

yes it works.... we are using in our project.

Which comment?

On Fri, Nov 4, 2016 at 11:56 PM, Pat Ferrel notifications@github.com
wrote:

Does this actually work? Not sure what your comment means.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#20 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIA1E9gNMvNgURX8iLKt5FQ6MdVzEadyks5q63jsgaJpZM4KpL2F
.

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

Successfully merging this pull request may close these issues.

2 participants