Class FacetField


  • public class FacetField
    extends FacetBase
    Field facet parameters
    • Constructor Detail

      • FacetField

        public FacetField​(java.lang.String field,
                          java.lang.String prefix,
                          FacetField.Sort sort,
                          java.lang.Integer limit,
                          java.lang.Integer offset,
                          java.lang.Integer minCount,
                          java.lang.Boolean missing,
                          java.util.List<java.lang.String> ensuredValues,
                          FacetDomain domain)
    • Method Detail

      • getPrefix

        public java.lang.String getPrefix()
        Returns:
        prefix. Limits the terms used for faceting to those that begin with the specified prefix
      • getSort

        public FacetField.Sort getSort()
        Returns:
        sort type. Controls how faceted results are sorted
      • getLimit

        public java.lang.Integer getLimit()
        Returns:
        limit. Controls how many constraints should be returned for each facet.

        Default is 100

      • getOffset

        public java.lang.Integer getOffset()
        Returns:
        offset. Specifies an offset into the facet results at which to begin displaying facets.
      • getMinCount

        public java.lang.Integer getMinCount()
        Returns:
        minimum count. Specifies the minimum counts required for a facet field to be included in the response. Default value is 1.
      • getMissing

        public java.lang.Boolean getMissing()
        Returns:
        include missing flag. Controls whether to include a count of all matching results which have no value for the field, in addition to the term-based constraints of a facet field.
      • getEnsuredValues

        public java.util.List<java.lang.String> getEnsuredValues()
        Returns:
        ensured values.

        Field facets only return getLimit() distinct values for the field in question. Other values are unrepresented in the field facet. Users who want to ensure that specific values are included can specify those values here. This guarantees that they appear as a value in the field facet, even if they have a low or zero count.