org.apache.solr.search
Class MissingStringLastComparatorSource

java.lang.Object
  extended by org.apache.solr.search.MissingStringLastComparatorSource
All Implemented Interfaces:
Serializable, SortComparatorSource

public class MissingStringLastComparatorSource
extends Object
implements SortComparatorSource

A SortComparatorSource for strings that orders null values after non-null values. Based on FieldSortedHitQueue.comparatorString

Version:
$Id: MissingStringLastComparatorSource.java 631357 2008-02-26 19:47:07Z yonik $
See Also:
Serialized Form

Field Summary
static String bigString
           
 
Constructor Summary
MissingStringLastComparatorSource()
           
MissingStringLastComparatorSource(String missingValueProxy)
          Creates a SortComparatorSource that uses missingValueProxy as the value to return from ScoreDocComparator.sortValue() which is only used my multisearchers to determine how to collate results from their searchers.
 
Method Summary
 ScoreDocComparator newComparator(IndexReader reader, String fieldname)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bigString

public static final String bigString
See Also:
Constant Field Values
Constructor Detail

MissingStringLastComparatorSource

public MissingStringLastComparatorSource()

MissingStringLastComparatorSource

public MissingStringLastComparatorSource(String missingValueProxy)
Creates a SortComparatorSource that uses missingValueProxy as the value to return from ScoreDocComparator.sortValue() which is only used my multisearchers to determine how to collate results from their searchers.

Parameters:
missingValueProxy - The value returned when sortValue() is called for a document missing the sort field. This value is *not* normally used for sorting, but used to create
Method Detail

newComparator

public ScoreDocComparator newComparator(IndexReader reader,
                                        String fieldname)
                                 throws IOException
Specified by:
newComparator in interface SortComparatorSource
Throws:
IOException


Copyright © 2008 Apache Software Foundation. All Rights Reserved.