change bigString to bigTerm and use 0xff bytes

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@996663 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2010-09-13 19:41:53 +00:00
parent 7a7e0e7836
commit dae51e3fc4
1 changed files with 6 additions and 2 deletions

View File

@ -29,12 +29,16 @@ import java.io.IOException;
public class MissingStringLastComparatorSource extends FieldComparatorSource {
public static final BytesRef bigString = new BytesRef("\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffffBIG_STRING");
/** A binary term consisting of a number of 0xff bytes, likely to be bigger than other terms
* one would normally encounter, and definitely bigger than any UTF-8 terms */
public static final BytesRef bigTerm = new BytesRef(
new byte[] {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1}
);
private final BytesRef missingValueProxy;
public MissingStringLastComparatorSource() {
this(bigString);
this(bigTerm);
}
/** Creates a {@link FieldComparatorSource} that sorts null last in a normal ascending sort.