about sortMissingLast and sortMissingFirst

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

about sortMissingLast and sortMissingFirst

James liu-2
i look expression about them in schema.xml.

but i m not clear.

My
understand: if sortMissingLast is true do last in descending sort. for example:
  field name : pname,  if sortMissingLast is true, pname will be sorted desc
and we can't find result with pname, only other field information.

am i wrong?



--
regards
jl
Reply | Threaded
Open this post in threaded view
|

Re: about sortMissingLast and sortMissingFirst

Chris Hostetter-3

: My
: understand: if sortMissingLast is true do last in descending sort. for example:
:   field name : pname,  if sortMissingLast is true, pname will be sorted desc
: and we can't find result with pname, only other field information.

sortMissingLast is used to determine how you want documents that don't
have a value to appear -- if sortMissingLast=true then it doesn't matter
whether you sort "asc" or "desc", documents that don't have a value for
that field will allways come last.  if sortMissingLast="false" then the
default Lucene sort behavior is used in which "missing" values are sorted
the same as empty strings -- it is the "lowest" possible value, so they
come first in asc sorts.



-Hoss