Class RangeFacetMap

All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>

public class RangeFacetMap extends JsonFacetMap<RangeFacetMap>
Represents a "range" facet in a JSON request query.

Ready for use with JsonQueryRequest.withFacet(String, Map)

See Also:
  • Constructor Details

    • RangeFacetMap

      public RangeFacetMap(String field, long start, long end, long gap)
    • RangeFacetMap

      public RangeFacetMap(String field, double start, double end, double gap)
    • RangeFacetMap

      public RangeFacetMap(String field, Date start, Date end, String gap)
      Creates a "range" facet representation for a date field
      Parameters:
      gap - a DateMathParser compatible time/interval String. (e.g. "+1MONTH")
  • Method Details

    • getThis

      public RangeFacetMap getThis()
      Specified by:
      getThis in class JsonFacetMap<RangeFacetMap>
    • setHardEnd

      public RangeFacetMap setHardEnd(boolean hardEnd)
      Indicates whether the facet's last bucket should stop exactly at end, or be extended to be gap wide

      Defaults to false if not specified.

      Parameters:
      hardEnd - true if the final bucket should be truncated at end; false otherwise
    • setOtherBuckets

      public RangeFacetMap setOtherBuckets(RangeFacetMap.OtherBuckets bucketSpecifier)
      Indicates that an additional range bucket(s) should be computed and added to those computed for start and end

      See RangeFacetMap.OtherBuckets for possible options.

    • setMinCount

      public RangeFacetMap setMinCount(int minOccurrences)
      Indicates that buckets should be returned only if they have a count of at least minOccurrences

      Defaults to '0' if not specified.