Class FacetRequestFactory

    • Constructor Detail

      • FacetRequestFactory

        public FacetRequestFactory()
    • Method Detail

      • getName

        public java.lang.String getName()
        The name of the facet.

        This is the name that will be used for retreiving the facet response from the query response.

      • setName

        public void setName​(java.lang.String value)
      • isTokens

        @Deprecated
        public boolean isTokens()
        Deprecated.
        Use TermVector field expression instead.
      • setTokens

        public void setTokens​(boolean value)
      • getField

        public FieldExpression getField()
        The field expression to facet over.
      • getSortOrder

        public Sort.SortOrder getSortOrder()
        Primary sort order for facet buckets.
      • getSecondarySortOrder

        public Sort.SortOrder getSecondarySortOrder()
        Secondary sort order for facet buckets.
      • setSecondarySortOrder

        public void setSecondarySortOrder​(Sort.SortOrder value)
      • getMaxBuckets

        public java.lang.Integer getMaxBuckets()
        Get the maximum number of buckets to return.

        If null max buckets will use configured defaults.

      • setMaxBuckets

        public void setMaxBuckets​(java.lang.Integer value)
      • getDistributedMaxBuckets

        public java.lang.Integer getDistributedMaxBuckets()
        Multi-partition tuning parameter.

        If null configured defaults will be used.

      • setDistributedMaxBuckets

        public void setDistributedMaxBuckets​(java.lang.Integer value)
      • getMinBucketCount

        public java.lang.Integer getMinBucketCount()
        Get the minimum bucket count required for bucket to be returned.

        If null min bucket count will use configured defaults.

      • setMinBucketCount

        public void setMinBucketCount​(java.lang.Integer value)
      • getDistributedMinBucketCount

        public java.lang.Integer getDistributedMinBucketCount()
        Multi-partition tuning parameter.

        If null configured defaults will be used.

      • setDistributedMinBucketCount

        public void setDistributedMinBucketCount​(java.lang.Integer value)
      • isStatistics

        public boolean isStatistics()
        true if statistics should be computed for facet.
      • setStatistics

        public void setStatistics​(boolean value)
      • isFacetFinder

        public boolean isFacetFinder()
        If false facet finder will ignore this facet.
      • setFacetFinder

        public void setFacetFinder​(boolean value)
      • getSampleMode

        public ShallowMode getSampleMode()
        Mode for computing shallow facets.
      • setSampleMode

        public void setSampleMode​(ShallowMode value)
      • getMaxMemoryUsage

        public long getMaxMemoryUsage()
        Max memory usage that should be used for facets.

        NOTE: this is just a hint.

      • setMaxMemoryUsage

        public void setMaxMemoryUsage​(long value)
      • isStoredFields

        public boolean isStoredFields()
        If true stored fields will be returned in schema facet.

        NOTE: Only applies to schema facets.

      • isIndexedFields

        public boolean isIndexedFields()
        If true indexed fields will be returned in schema facet.

        NOTE: Only applies to schema facets.

      • isFacetFields

        public boolean isFacetFields()
        If true facetable fields will be returned in schema facet.

        NOTE: Only applies to schema facets.

      • isSortFields

        public boolean isSortFields()
        If true sortable fields will be returned in schema facet.

        NOTE: Only applies to schema facets.

      • isRealTimeFields

        public boolean isRealTimeFields()
        If true schema facet will be computed over real time fields.

        NOTE: Only applies to schema facet.

      • setRealTimeFields

        public void setRealTimeFields​(boolean value)
      • isCountBuckets

        public boolean isCountBuckets()
        If false buckets will not contain counts.

        If document frequencies are not needed, setting this to false will result in faster computation.

        NOTE: Currently only applies to schema facet.

      • setCountBuckets

        public void setCountBuckets​(boolean value)
      • isCountValues

        public boolean isCountValues()
        If true buckets will contain value counts in addition to document counts.

        NOTE: Setting this to true will result in slower facet computation.

        NOTE: Currently only applies to schema facet.

      • setCountValues

        public void setCountValues​(boolean value)
      • getTerms

        public java.util.List<java.lang.String> getTerms()
        List of discrete facet buckets to return.

        NOTE: currently only supported by schema facet.

      • setTerms

        public void setTerms​(java.util.List<java.lang.String> value)
      • addTerm

        public void addTerm​(java.lang.String term)
        NOTE: currently only applies to schema facet.
      • getFilters

        public java.util.Map<java.lang.String,​Query> getFilters()
        Filters to compute document frequencies for.

        Syntax: filter=(label, queryfilter)

        • label = String label for returned bucket.
        • queryfilter = Quoted string containing query in advanced query language.
      • setFilters

        public void setFilters​(java.util.Map<java.lang.String,​Query> value)
      • addFilter

        public void addFilter​(java.lang.String label,
                              Query filter)
      • getRanges

        public java.util.List<FacetRange> getRanges()
        Ranges to compute document frequencies for.
      • setRanges

        public void setRanges​(java.util.List<FacetRange> value)
      • addRange

        public void addRange​(FacetRange range)