|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.search.SortComparator
org.apache.jackrabbit.core.query.lucene.SharedFieldSortComparator
public class SharedFieldSortComparator
Implements a SortComparator
which knows how to sort on a lucene
field that contains values for multiple properties.
newComparator(org.apache.lucene.index.IndexReader, java.lang.String)
does not implement the contract for ScoreDocComparator.sortValue(ScoreDoc)
properly. The method will always return an empty String to save memory consumption
on large property ranges. Those values are only of relevance when queries
are executed with a MultiSearcher
, which is currently not the
case in Jackrabbit.
Constructor Summary | |
---|---|
SharedFieldSortComparator(String fieldname)
Creates a new SharedFieldSortComparator for a given shared
field. |
|
SharedFieldSortComparator(String fieldname,
boolean createComparatorValues)
Creates a new SharedFieldSortComparator for a given shared
field. |
Method Summary | |
---|---|
protected Comparable |
getComparable(String termtext)
|
org.apache.lucene.search.ScoreDocComparator |
newComparator(org.apache.lucene.index.IndexReader reader,
String propertyName)
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 |
Constructor Detail |
---|
public SharedFieldSortComparator(String fieldname)
SharedFieldSortComparator
for a given shared
field.
fieldname
- the shared field.public SharedFieldSortComparator(String fieldname, boolean createComparatorValues)
SharedFieldSortComparator
for a given shared
field.
fieldname
- the shared field.createComparatorValues
- if true
creates values
for the ScoreDocComparator
s.createComparatorValues
Method Detail |
---|
public org.apache.lucene.search.ScoreDocComparator newComparator(org.apache.lucene.index.IndexReader reader, String propertyName) throws IOException
ScoreDocComparator
for an embedded
propertyName
and a reader
.
newComparator
in interface org.apache.lucene.search.SortComparatorSource
newComparator
in class org.apache.lucene.search.SortComparator
reader
- the index reader.propertyName
- the name of the property to sort.
ScoreDocComparator
for the
IOException
IOException
protected Comparable getComparable(String termtext)
getComparable
in class org.apache.lucene.search.SortComparator
UnsupportedOperationException
- always.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |