org.hibernate.search.query.facet
Interface Facet

All Known Subinterfaces:
RangeFacet<T>
All Known Implementing Classes:
AbstractFacet, RangeFacetImpl

public interface Facet

A single facet (field value and count).

Author:
Hardy Ferentschik

Method Summary
 int getCount()
           
 String getFacetingName()
           
 org.apache.lucene.search.Query getFacetQuery()
           
 String getFieldName()
          Return the Document field name this facet is targeting.
 String getValue()
           
 

Method Detail

getFacetingName

String getFacetingName()
Returns:
the faceting name this Facet belongs to.
See Also:
FacetingRequest.getFacetingName()

getFieldName

String getFieldName()
Return the Document field name this facet is targeting. The field needs to be indexed with Analyze.NO.

Returns:
the Document field name this facet is targeting.

getValue

String getValue()
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.

getCount

int getCount()
Returns:
the facet count.

getFacetQuery

org.apache.lucene.search.Query getFacetQuery()
Returns:
a Lucene Query which which can be executed to retrieve all documents matching the value of this facet.


Copyright © 2006–2013 Hibernate. All rights reserved.