fix reverse sorting when sortMissingFirst=true

git-svn-id: https://svn.apache.org/repos/asf/incubator/solr/trunk@422280 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2006-07-15 19:29:43 +00:00
parent 89a47d094f
commit 9909374e04
3 changed files with 4 additions and 1 deletions

View File

@ -51,6 +51,8 @@ Bug Fixes
3. Added empty extractTerms() to FunctionQuery to enable use in 3. Added empty extractTerms() to FunctionQuery to enable use in
a MultiSearcher (Yonik) a MultiSearcher (Yonik)
4. WordDelimiterFilter sometimes lost token positionIncrement information 4. WordDelimiterFilter sometimes lost token positionIncrement information
5. Fix reverse sorting for fields were sortMissingFirst=true
(Rob Staveley, yonik)
Other Changes Other Changes
1. Upgrade to Lucene 2.0 nightly build 2006-06-22, lucene SVN revision 416224, 1. Upgrade to Lucene 2.0 nightly build 2006-06-22, lucene SVN revision 416224,

View File

@ -44,7 +44,7 @@ public class Sorting {
if (!reverse) return new SortField(fieldName, nullStringLastComparatorSource); if (!reverse) return new SortField(fieldName, nullStringLastComparatorSource);
else return new SortField(fieldName, SortField.STRING, true); else return new SortField(fieldName, SortField.STRING, true);
} else if (nullFirst) { } else if (nullFirst) {
if (reverse) return new SortField(fieldName, nullStringLastComparatorSource); if (reverse) return new SortField(fieldName, nullStringLastComparatorSource, true);
else return new SortField(fieldName, SortField.STRING, false); else return new SortField(fieldName, SortField.STRING, false);
} else { } else {
return new SortField(fieldName, SortField.STRING, reverse); return new SortField(fieldName, SortField.STRING, reverse);

View File

@ -311,6 +311,7 @@
<field name="lengthfilt" type="lengthfilt" indexed="true" stored="true"/> <field name="lengthfilt" type="lengthfilt" indexed="true" stored="true"/>
<field name="dedup" type="dedup" indexed="true" stored="true"/> <field name="dedup" type="dedup" indexed="true" stored="true"/>
<field name="nullfirst" type="string" indexed="true" stored="true" sortMissingFirst="true"/>
<field name="subword" type="subword" indexed="true" stored="true"/> <field name="subword" type="subword" indexed="true" stored="true"/>
<field name="sku1" type="skutype1" indexed="true" stored="true"/> <field name="sku1" type="skutype1" indexed="true" stored="true"/>