Class FacetResult


  • public final class FacetResult
    extends Facet
    Successfully executed facet containing additional statistics on the response of a query.
    • Constructor Detail

      • FacetResult

        public FacetResult()
    • Method Detail

      • totalRecords

        public long totalRecords()
        Get the totalRecords property: Number of total records in the facet results.
        Returns:
        the totalRecords value.
      • withTotalRecords

        public FacetResult withTotalRecords​(long totalRecords)
        Set the totalRecords property: Number of total records in the facet results.
        Parameters:
        totalRecords - the totalRecords value to set.
        Returns:
        the FacetResult object itself.
      • count

        public int count()
        Get the count property: Number of records returned in the facet response.
        Returns:
        the count value.
      • withCount

        public FacetResult withCount​(int count)
        Set the count property: Number of records returned in the facet response.
        Parameters:
        count - the count value to set.
        Returns:
        the FacetResult object itself.
      • data

        public Object data()
        Get the data property: A JObject array or Table containing the desired facets. Only present if the facet is valid.
        Returns:
        the data value.
      • withData

        public FacetResult withData​(Object data)
        Set the data property: A JObject array or Table containing the desired facets. Only present if the facet is valid.
        Parameters:
        data - the data value to set.
        Returns:
        the FacetResult object itself.
      • withExpression

        public FacetResult withExpression​(String expression)
        Set the expression property: Facet expression, same as in the corresponding facet request.
        Overrides:
        withExpression in class Facet
        Parameters:
        expression - the expression value to set.
        Returns:
        the Facet object itself.