Class CascadingSelectCustomFieldIndexer

java.lang.Object
com.atlassian.jira.search.issue.index.indexers.impl.BaseCustomFieldIndexer
com.atlassian.jira.search.issue.index.indexers.impl.CascadingSelectCustomFieldIndexer
All Implemented Interfaces:
CustomFieldIndexer, FieldIndexer

public class CascadingSelectCustomFieldIndexer extends BaseCustomFieldIndexer
This indexer contains two inner class indexers: one for indexing Child Options and another for indexing Combined (Parent and Child) Options. Each field uses a different name for indexing; however, we want them to be indexed together when CascadingSelectCustomFieldIndexer.indexFields() is called. Therefore, the inner class indexers should only be invoked by CascadingSelectCustomFieldIndexer.indexFields() and not from outside this class.
Since:
10.7
  • Field Details

  • Constructor Details

  • Method Details

    • getFields

      public Collection<Field> getFields()
      Description copied from interface: FieldIndexer
      Declares the fields to be added to the index schema
      Specified by:
      getFields in interface FieldIndexer
      Overrides:
      getFields in class BaseCustomFieldIndexer
    • indexFields

      public void indexFields(FieldValueCollector collector, Issue issue, CustomFieldPrefetchedData prefetchedData)
      Description copied from interface: FieldIndexer
      This method allows an indexer the opportunity to add values to the provided collector that are relevant for searching and storage of the portion of the issue that the FieldIndexer handles.

      If, for example, the indexer handles indexing an issues summary then this indexer will add a field value to the collector that represents the stored and searchable summary of the issue.

      Note that trying to index very large (i.e. larger than ~32 kB) fields as KeywordField will result in them being removed to prevent the indexing operation from crashing. This is a limitation of how OpenSearch and Lucene store terms.

      Parameters:
      collector - the collector for collecting indexed values
      issue - the issue that contains the data that will be indexed and which can be used to determine the project/issue type context that will allow you to determine if we should add the value as searchable or unsearchable.
      prefetchedData - if the custom field type implemented CustomFieldType.getNonNullCustomFieldProvider() this reference will hold the matching value returned from NonNullCustomFieldProvider.getCustomFieldInfo(List <Issue>)
    • skipsIndexingNull

      public boolean skipsIndexingNull()
      Description copied from interface: FieldIndexer
      Used to declare how the indexer handles nulls.
      Returns:
      true if the indexer doesn't do anything when the field value is null