You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Ryan McKinley <ry...@gmail.com> on 2010/09/15 03:40:59 UTC

/trunk sortMissingLast="true" status?

Testing with r997128:

I have a field defined as:
<fieldType name="bytes"  class="solr.TrieLongField"
sortMissingLast="true" precisionStep="0" omitNorms="true"
positionIncrementGap="0"/>

When I call ?sort=bytes desc,  everything works as expected, the
biggest thigns are first.  When I call ?sort=bytes asc, the entries
without a bytes field all go first.

I am sort of following the changes in LUCENE-2504, that point to
odities with sortMissignLast, but yoniks comments in #997095 suggest
this should be working.

Am i missing something?

Thanks
Ryan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: /trunk sortMissingLast="true" status?

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Tue, Sep 14, 2010 at 9:40 PM, Ryan McKinley <ry...@gmail.com> wrote:
> Testing with r997128:
>
> I have a field defined as:
> <fieldType name="bytes"  class="solr.TrieLongField"
> sortMissingLast="true" precisionStep="0" omitNorms="true"
> positionIncrementGap="0"/>

SortMissingLast/SortMissingFirst is currently only supported with
fields that internally use a StringIndex (now DocTermsIndex) because
that's the only FieldCache representation that records what fields are
missing (via an ord of 0).

There's a note in the example schema.xml:

    <!-- The optional sortMissingLast and sortMissingFirst attributes are
         currently supported on types that are sorted internally as strings.
               This includes
"string","boolean","sint","slong","sfloat","sdouble","pdate"

That's actually the only reason the sint type fields are still around.
 If we could distinguish between 0 and missing, we could
deprecate/remove the s* fields and always use trie fields.

-Yonik
http://lucenerevolution.org  Lucene/Solr Conference, Boston Oct 7-8

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org