org.apache.jackrabbit.core.query.lucene
Class SharedFieldSortComparator
java.lang.Object
org.apache.lucene.search.SortComparator
org.apache.jackrabbit.core.query.lucene.SharedFieldSortComparator
- All Implemented Interfaces:
- Serializable, org.apache.lucene.search.SortComparatorSource
public class SharedFieldSortComparator
- extends org.apache.lucene.search.SortComparator
Implements a SortComparator which knows how to sort on a lucene
field that contains values for multiple properties.
- See Also:
- Serialized Form
|
Method Summary |
protected Comparable |
getComparable(String termtext)
|
org.apache.lucene.search.ScoreDocComparator |
newComparator(org.apache.lucene.index.IndexReader reader,
String relPath)
Creates a new ScoreDocComparator for an embedded
propertyName and a reader. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SharedFieldSortComparator
public SharedFieldSortComparator(String fieldname,
ItemStateManager ism,
HierarchyManager hmgr,
NamespaceMappings nsMappings)
- Creates a new
SharedFieldSortComparator for a given shared
field.
- Parameters:
fieldname - the shared field.ism - the item state manager of this workspace.hmgr - the hierarchy manager of this workspace.nsMappings - the index internal namespace mappings.
newComparator
public org.apache.lucene.search.ScoreDocComparator newComparator(org.apache.lucene.index.IndexReader reader,
String relPath)
throws IOException
- Creates a new
ScoreDocComparator for an embedded
propertyName and a reader.
- Specified by:
newComparator in interface org.apache.lucene.search.SortComparatorSource- Overrides:
newComparator in class org.apache.lucene.search.SortComparator
- Parameters:
reader - the index reader.relPath - the relative path to the property to sort on as returned
by Path.getString().
- Returns:
- a
ScoreDocComparator for the
- Throws:
IOException - if an error occurs while reading from the index.
getComparable
protected Comparable getComparable(String termtext)
- Specified by:
getComparable in class org.apache.lucene.search.SortComparator
- Throws:
UnsupportedOperationException - always.
Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.