Class FacetEntry

java.lang.Object
io.fluxcapacitor.common.api.search.FacetEntry
All Implemented Interfaces:
Comparable<FacetEntry>

public class FacetEntry extends Object implements Comparable<FacetEntry>
Represents a single facet field-value pair within a document.

Facet entries are typically included in SerializedDocument instances to make the document searchable and filterable by discrete values. These entries are also used when computing facet statistics and filtering using FacetConstraint.

The compareTo(FacetEntry) implementation ensures consistent ordering of facet entries first by name, then by value.

See Also:
  • Constructor Details

    • FacetEntry

      public FacetEntry()
  • Method Details

    • compareTo

      public int compareTo(@NonNull @NonNull FacetEntry o)
      Sorts facet entries by name, then by value.
      Specified by:
      compareTo in interface Comparable<FacetEntry>
      Parameters:
      o - the other facet entry to compare against
      Returns:
      the result of comparing name first, then value