org.hibernate.search.query.dsl.impl
Class AbstractFacet
java.lang.Object
org.hibernate.search.query.dsl.impl.AbstractFacet
- All Implemented Interfaces:
- Facet
- Direct Known Subclasses:
- RangeFacetImpl
public abstract class AbstractFacet
- extends Object
- implements Facet
A single facet (field value and count).
- Author:
- Hardy Ferentschik
AbstractFacet
public AbstractFacet(String facetingName,
String fieldName,
String value,
int count)
getCount
public int getCount()
- Specified by:
getCount in interface Facet
- Returns:
- the facet count.
getValue
public String getValue()
- Specified by:
getValue in interface Facet
- Returns:
- the value of this facet. In case of a discrete facet it is the actual
Document field value. In case of a range query the value is a
string representation of the range.
getFieldName
public String getFieldName()
- Description copied from interface:
Facet
- Return the
Document field name this facet is targeting.
The field needs to be indexed with Analyze.NO.
- Specified by:
getFieldName in interface Facet
- Returns:
- the
Document field name this facet is targeting.
getFacetingName
public String getFacetingName()
- Specified by:
getFacetingName in interface Facet
- Returns:
- the faceting name this
Facet belongs to. - See Also:
FacetingRequest.getFacetingName()
getFacetQuery
public abstract org.apache.lucene.search.Query getFacetQuery()
- Specified by:
getFacetQuery in interface Facet
- Returns:
- a Lucene
Query which which can be executed to retrieve all
documents matching the value of this facet.
equals
public boolean equals(Object o)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2006–2013 Hibernate. All rights reserved.