Class Facet

java.lang.Object
de.cxp.ocs.model.result.Facet

public class Facet extends Object
  • Field Details

    • fieldName

      @NonNull public @NonNull String fieldName
      this is the name of the according data field. If a different label should be used, put that into meta data.
    • absoluteFacetCoverage

      public long absoluteFacetCoverage
      This is the amount of matched documents that are covered by that facet.
    • isFiltered

      public boolean isFiltered
      Is set to true if there an active filter from that facet.
    • entries

      public List<FacetEntry> entries
      The entries of that facet.
    • type

      public String type
    • meta

      public Map<String,Object> meta
      Optional meta data for that facet, e.g. display hints like a label or a facet-type.
  • Constructor Details

    • Facet

      public Facet()
  • Method Details

    • addEntry

      public Facet addEntry(String key, long docCount, String link)
      Add simple FacetEntry to the facet. Only meaningful for TextFacets.
      Parameters:
      key - key of the facet entry to add
      docCount - related document count of the facet entry to add
      link - related link of the facet entry to add
      Returns:
      the changed facet
    • addEntry

      public Facet addEntry(FacetEntry entry)
      Add facet entry to facet.
      Parameters:
      entry - the facet entry to add
      Returns:
      the changed facet