java.lang.Object
com.atlassian.confluence.impl.search.v2.extractor.LabelExtractor
All Implemented Interfaces:
Extractor2

public class LabelExtractor extends Object implements Extractor2
Extract label data from content entity objects.
Since:
7.20
  • Field Details

    • LABEL_FIELD

      @Deprecated public static final String LABEL_FIELD
      Deprecated.
      since 7.20 use SearchFieldMappings.LABEL instead.
      Assigned multiple fields of namespaced labels
    • LABEL_TEXT_FIELD

      @Deprecated public static final String LABEL_TEXT_FIELD
      Deprecated.
      since 7.20 use SearchFieldMappings.LABEL_TEXT instead.
      This field is assigned a value consisting of a space delimited list of all the publicly visible labels on a piece of content.
    • INHERITED_LABEL_FIELD

      @Deprecated public static final String INHERITED_LABEL_FIELD
      Deprecated.
      since 7.20 use SearchFieldMappings.INHERITED_LABEL instead.
      The same as LABEL_FIELD, but for labels inherited from a containing object (i.e. comments will get the labels of the object they are commenting on).
    • INHERITED_LABEL_TEXT_FIELD

      @Deprecated public static final String INHERITED_LABEL_TEXT_FIELD
      Deprecated.
      The same as LABEL_TEXT_FIELD, but for labels inherited from a containing object (i.e. comments will get the labels of the object they are commenting on).
  • Constructor Details

    • LabelExtractor

      public LabelExtractor()
  • Method Details

    • extractText

      public StringBuilder extractText(Object searchable)
      Returns a buffer of text that will be appended onto the end of a larger buffer of text that will eventually become the searchable body text.
      Specified by:
      extractText in interface Extractor2
      Parameters:
      searchable - a searchable object
      Returns:
      Returns a buffer of text.
    • extractFields

      public Collection<FieldDescriptor> extractFields(Object searchable)
      Extract fields from the searchable object.
      Specified by:
      extractFields in interface Extractor2
      Parameters:
      searchable - a searchable object
      Returns:
      list of fields extracted from the searchable object