On Thursday 20 August 2009 16:07, johan.sjob...@findwise.se wrote:
> we're performing range queries of a field which is of type double. Some
> queries which should generate results does not, and I think it's best
> explained by the following examples; it's also expected to exist data in
> all ranges:
>
>
> ?q=field:[10.0 TO 20.0] // OK
> ?q=field:[9.0 TO 20.0] // NOT OK
> ?q=field:[09.0 TO 20.0] // OK
>
> Interesting here is that the range query only works if both ends of the
> interval is of equal length (hence 09-to-20 works, but not 9-20).
> Unfortunately, this logic does not work for ranges in the 100s.
>
>
>
> ?q=field:[* TO 500]  // OK
> ?q=field:[100.0 TO 500.0] // OK
> ?q=field:[90.0 TO 500.0] // NOT OK
> ?q=field:[090.0 TO 500.0] // NOT OK
>
>
>
> Any ideas to this very strange behaviour?

You'll want to use SortableDoubleField for range queries to work as expected.

Also, do have a look at TrieField if you're on a recent enough version of 
Solr.

.øs

-- 
Øystein Steimler, Produktans, EasyConnect AS  -  http://opplysning1890.no
oystein.steim...@easyconnect.no  - GPG: 0x784a7dea - Mob: 90010882

Attachment: pgp6bdTiKfUhi.pgp
Description: PGP signature

Reply via email to