0

I've implemented Solr and I am attempting to range query on a field and I am getting only half the expected results. Anyone have any ideas as to what might be going on here?

example: myData = { item1: { my_field: 98 }, item2: { my_field: 99 }, item3: { my_field: 99 }, item4: { my_field: 99 }, item5: { my_field: 99 }, item6: { my_field: 99 } } Range Queries:

  • [99 TO 99] // returns 1/5 expected results: item2
  • [99 TO 100] //returns 2/5: item2, item3
  • [99 TO 101] // returns 2/5: item2, item3
  • [99 TO 102] // Finally returns 5/5: item2, item3, item4, item5, item6
user1325159
  • 187
  • 1
  • 9
  • What is the field type for my_value? Is it like this? this gives a good guide for range queries: https://www.slideshare.net/VadimKirilchuk/numeric-rangequeries – binarymax Aug 11 '17 at 18:36
  • All I can tell is, it's stored as indexed integer. It looks like we are using some sort of dynamic schema generation based of field name format. Thanks though @binarymax . Will update once I find out more information. – user1325159 Aug 11 '17 at 19:16
  • How are the actual documents structured? Are these six documents with just a single `my_field`? Is the `my_field` actually defined as an integer (the schema browser should tell you this)? Integers as string tokens might give you behaviour like this. – MatsLindh Aug 11 '17 at 22:19

0 Answers0