Class SchemaFacetRequest

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class SchemaFacetRequest
    extends FacetRequest
    FacetRequest for getting the fields populated in documents for the search query.
    See Also:
    Serialized Form
    • Constructor Detail

      • SchemaFacetRequest

        public SchemaFacetRequest()
      • SchemaFacetRequest

        public SchemaFacetRequest​(java.lang.String name)
    • Method Detail

      • setField

        public void setField​(java.lang.String name)
        Set the field to request a facet for.
        Overrides:
        setField in class FacetRequest
      • getField

        public java.lang.String getField()
        Get the field to request a facet for.
        Overrides:
        getField in class FacetRequest
      • isFacetFinder

        public boolean isFacetFinder()
        true if the facet finder can replace this FacetRequest with a suggested FacetRequest.

        This will replace a FacetRequest for a numeric field with a RangeFacetRequest when facet finder runs.

        Overrides:
        isFacetFinder in class FacetRequest
      • setFacetFinder

        public void setFacetFinder​(boolean value)
        Set if FacetFinder is allowed to provide a suggestion for this FacetRequest.
        Overrides:
        setFacetFinder in class FacetRequest
      • isRealTimeFields

        public boolean isRealTimeFields()
        Get if real time fields are requested instead of regular fields.
      • setRealTimeFields

        public void setRealTimeFields​(boolean value)
        Set if real time fields are requested instead of regular fields.
      • getSchemaTypes

        public java.util.List<SchemaField.Type> getSchemaTypes()
        Get the allowed types for returned fields.

        If empty, fields will be returned regardless of type.

      • setSchemaTypes

        public void setSchemaTypes​(java.util.List<SchemaField.Type> value)
      • getSchemaFields

        public java.util.Set<java.lang.String> getSchemaFields()
        Get the schema fields being requested for this request.
      • addSchemaField

        public void addSchemaField​(java.lang.String name)
        Add a field to return schema field information.

        If using this method, buckets will only be returned for the requested fields.

      • isStoredFields

        public boolean isStoredFields()
        true if buckets for stored fields should be returned.
      • setStoredFields

        public void setStoredFields​(boolean value)
        Set if stored fields should be returned.
      • isIndexedFields

        public boolean isIndexedFields()
        true if buckets for indexed fields should be returned.
      • setIndexedFields

        public void setIndexedFields​(boolean value)
        Set if indexed fields should be returned.
      • isFacetFields

        public boolean isFacetFields()
        true if buckets for facet fields should be returned.
      • setFacetFields

        public void setFacetFields​(boolean value)
        Set if facet fields should be returned.
      • isSortFields

        public boolean isSortFields()
        true if buckets for sort fields should be returned.
      • setSortFields

        public void setSortFields​(boolean value)
        Set if sort fields should be returned.
      • isCountValues

        public boolean isCountValues()
        Get if buckets should include a value count in addition to a document count.

        NOTE: when enabled, buckets will be returned as SchemaFieldBucket, which will include a value count.

      • setCountValues

        public void setCountValues​(boolean value)
        Set if buckets should include a value count in addition to a document count.

        NOTE: when enabled, buckets will be returned as SchemaFieldBucket, which will include a value count.

      • isCountBuckets

        public boolean isCountBuckets()
        Get if buckets will be counted.

        NOTE: if buckets are not counted, the counts returned for the buckets will not be accurate. In this case, the existance of a bucket will indicate that the field is populated in 1 or more documents matching the query. This is useful for determining the minimal schema for the documents that match a query.

      • setCountBuckets

        public void setCountBuckets​(boolean value)
        Set if buckets will be counted.
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class FacetRequest