: value? I need the sort such that ascending will have the NULL values first
: and descending will have the NULL values last (i.e. sortMissingFirst="false"
: and sortMissingLast="false").

You can configure a default="X" attribute on your field such that X is the 
minimum legal value for your field type (ie: -2147483648 for TrieIntField, 
-9223372036854775808 for TrieLongField etc...).  but then those values 
will be stored in the docs as well -- in which case you're best bet would 
be to use 2 fields, one to index/store the 'real' value and one (with the 
default specified) that is un-indexed/un-stored but uses docValues for 
sorting.


A workarround that would probably be good enough for floats/doubles w/o 
reindexing would be to sort on the "def()" function using 
"-(Double.MAX_VALUE)" as the default...

  sort=def(your_field,-1.7976931348623157E308) asc
  sort=def(your_field,-1.7976931348623157E308) desc


...i mention this as being a workarround for floats/doubles because the 
functions are evaluated as doubles (no "casting" or "forced integer 
context" type support at the moment), so with integer/float fields there 
would be some loss of precision.


-Hoss
http://www.lucidworks.com/

Reply via email to