Lucene.Net range subquery not returning expected results (RavenDB related) -
i'm trying write lucene query filter data in ravendb. of documents in specific collection assigned sequential number, , valid ranges not continuous (for example, 1 range can 100-200 , 1000 1400). want query ravendb using raven studio (v2.5, silverlight client) retrieve documents have values outside of these user-defined ranges.
this overly simplified document structure:
{ externalid: something/1, sequentialnumber: 12345 }
to test, added 3500 documents, of have sequentialnumber
that's inside 1 of following 2 ranges: 123-312
, 9000-18000
, except 1 has 100000123
. externalid
field reference parent document, , test documents have field set something/1
. lucene query came with:
externalid: something/1 , not (sequentialnumber: [123 321] or sequentialnumber: [9000 18000])
running query in ravendb's studio returns documents sequentialnumber
isn't in 123-321
range. expect return document has 100000123
sequentialnumber
. i've been trying google help, far haven't found steer me right direction.
what doing wrong?
ravendb indexing numbers in 2 ways, once strings (which see here) , once in numeric form. range queries use:
sequentialnumber_range: [ix123 ix321] or sequentialnumber_range: [ix9000 ix18000])
the ix prefix means using int32
Comments
Post a Comment