Class FacetHelper

  • Direct Known Subclasses:
    FacetParserHelper

    public class FacetHelper
    extends java.lang.Object
    Facet helper
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected FacetHelper()
      Constructor
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Facet dateRange​(java.lang.String name, java.lang.String field, java.lang.String nestedPath, java.lang.String dateFormat, java.util.List<RangeFacetValue> ranges)
      Create a date range facet
      static Facet dateRange​(java.lang.String name, java.lang.String field, java.lang.String dateFormat, java.util.List<RangeFacetValue> ranges)
      Create a date range facet
      static Facet filters​(java.lang.String name, java.util.Map<java.lang.String,​Query> filters)
      Create a filters facet
      static Facet terms​(java.lang.String name, java.lang.String field, java.lang.Integer size, FacetOrder order)
      Create a facet
      static Facet terms​(java.lang.String name, java.lang.String field, java.lang.String nestdPath, java.lang.Integer size, FacetOrder order)
      Create a facet
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FacetHelper

        protected FacetHelper()
        Constructor
    • Method Detail

      • terms

        public static final Facet terms​(java.lang.String name,
                                        java.lang.String field,
                                        java.lang.String nestdPath,
                                        java.lang.Integer size,
                                        FacetOrder order)
                                 throws InvalidCreateOperationException
        Create a facet
        Parameters:
        name - name of the facet
        field - field of facet data
        nestdPath - nested path of field of facet data
        size - size of the facet
        order - order of the facet
        Returns:
        a Facet
        Throws:
        InvalidCreateOperationException - when creating facet errors
      • terms

        public static final Facet terms​(java.lang.String name,
                                        java.lang.String field,
                                        java.lang.Integer size,
                                        FacetOrder order)
                                 throws InvalidCreateOperationException
        Create a facet
        Parameters:
        name - name of the facet
        field - field of facet data
        size - size of the facet
        order - order of the facet
        Returns:
        a Facet
        Throws:
        InvalidCreateOperationException - when creating facet errors
      • dateRange

        public static final Facet dateRange​(java.lang.String name,
                                            java.lang.String field,
                                            java.lang.String nestedPath,
                                            java.lang.String dateFormat,
                                            java.util.List<RangeFacetValue> ranges)
                                     throws InvalidCreateOperationException
        Create a date range facet
        Parameters:
        name - name of the facet
        field - field of facet data
        nestedPath - nested path of field of facet data
        dateFormat - the date format for the ranges of the facet
        ranges -
        Returns:
        Throws:
        InvalidCreateOperationException
      • dateRange

        public static final Facet dateRange​(java.lang.String name,
                                            java.lang.String field,
                                            java.lang.String dateFormat,
                                            java.util.List<RangeFacetValue> ranges)
                                     throws InvalidCreateOperationException
        Create a date range facet
        Parameters:
        name - name of the facet
        field - field of facet data
        dateFormat - the date format for the ranges of the facet
        ranges -
        Returns:
        Throws:
        InvalidCreateOperationException