public class DocPropertyNumberOfHits extends DocProperty
logger, reverse
Constructor and Description |
---|
DocPropertyNumberOfHits() |
Modifier and Type | Method and Description |
---|---|
int |
compare(DocResult a,
DocResult b)
Compares two docs on this property
|
static DocPropertyNumberOfHits |
deserialize() |
PropertyValueInt |
get(DocResult result)
Get the desired grouping/sorting property from the DocResult object
|
String |
name()
Get the name of the property
|
org.apache.lucene.search.Query |
query(BlackLabIndex index,
PropertyValue value)
Generate a query matching the specified value for our property.
|
DocProperty |
reverse()
Reverse the comparison.
|
String |
serialize()
Serialize this HitProperty so we can deserialize it later (to pass it via
URL, for example)
|
protected boolean |
sortDescendingByDefault()
Is the default for this property to sort descending?
This is usually a good default for "group size" or "number of hits".
|
canConstructQuery, deserialize, equals, getFacetsUrlParam, hashCode, isReverse, serializeReverse, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
ignoreSensitivity, isCompound, propNames, props
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public static DocPropertyNumberOfHits deserialize()
protected boolean sortDescendingByDefault()
DocProperty
sortDescendingByDefault
in class DocProperty
public PropertyValueInt get(DocResult result)
DocProperty
get
in interface ResultProperty<DocResult>
get
in class DocProperty
result
- the result to get the grouping property forpublic int compare(DocResult a, DocResult b)
compare
in interface Comparator<DocResult>
compare
in interface ResultProperty<DocResult>
compare
in class DocProperty
a
- first docb
- second docpublic String name()
ResultProperty
name
in interface ResultProperty<DocResult>
name
in class DocProperty
public String serialize()
ResultProperty
serialize
in interface ResultProperty<DocResult>
serialize
in class DocProperty
public DocProperty reverse()
DocProperty
reverse
in interface ResultProperty<DocResult>
reverse
in class DocProperty
public org.apache.lucene.search.Query query(BlackLabIndex index, PropertyValue value)
DocProperty
query
in class DocProperty
index
- our index (for finding field properties such as tokenized or not, analyzer, unknown value)value
- value to matchCopyright © 2020 Instituut voor Nederlandse Taal (INT). All rights reserved.