Class FacetField

java.lang.Object
org.apache.lucene.document.Field
org.apache.lucene.facet.FacetField
All Implemented Interfaces:
IndexableField

public class FacetField extends Field
Add an instance of this to your Document for every facet label.

NOTE: you must call FacetsConfig.build(Document) before you add the document to IndexWriter.

  • Field Details

  • Constructor Details

    • FacetField

      public FacetField(String dim, String... path)
      Creates the this from dim and path.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Field
    • verifyLabel

      public static void verifyLabel(String label)
      Verifies the label is not null or empty string.
      NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.