Interface FieldWithVisibilityIndexer
- All Superinterfaces:
FieldIndexer
- All Known Implementing Classes:
AssigneeIndexer,CascadingSelectCustomFieldIndexer,DateCustomFieldIndexer,DueDateIndexer,GroupCustomFieldIndexer,MultiGroupCustomFieldIndexer,ProjectCustomFieldIndexer,ReporterIndexer,ResolutionDateIndexer,SelectCustomFieldIndexer,UpdatedDateIndexer
This extends
FieldIndexer and enforces the implementation of indexFieldWithVisibility
It is mainly designed to eliminate expensive calls to FieldIndexer.isFieldVisibleAndInScope(Issue) method.
Due to complex hierarchy of indexer related classes instead of providing any abstract common class,
it was decided to extend FieldIndexer and override the default implementation of indexFieldWithVisibility
to enforce indexers to implement this method.- Since:
- 11.0
-
Field Summary
Fields inherited from interface com.atlassian.jira.search.issue.index.indexers.FieldIndexer
LABELS_NO_VALUE_INDEX_VALUE, NO_VALUE_INDEX_VALUE -
Method Summary
Modifier and TypeMethodDescriptiondefault voidindexFields(FieldValueCollector collector, Issue issue, CustomFieldPrefetchedData prefetchedData) It is a default implementation ofFieldIndexer.indexFields(FieldValueCollector, Issue, CustomFieldPrefetchedData)for indexers which implementFieldWithVisibilityIndexer.voidindexFieldsWithVisibility(FieldValueCollector collector, Issue issue, CustomFieldPrefetchedData prefetchedData, boolean visible) Enforce implementing indexFieldWithVisibility instead of indexFields.Methods inherited from interface com.atlassian.jira.search.issue.index.indexers.FieldIndexer
getFields, getId, isFieldVisibleAndInScope, skipsIndexingNull
-
Method Details
-
indexFields
default void indexFields(FieldValueCollector collector, Issue issue, CustomFieldPrefetchedData prefetchedData) It is a default implementation ofFieldIndexer.indexFields(FieldValueCollector, Issue, CustomFieldPrefetchedData)for indexers which implementFieldWithVisibilityIndexer. It shouldn't be used directly- Specified by:
indexFieldsin interfaceFieldIndexer- Parameters:
collector- the collector for collecting indexed valuesissue- that is having a document created from.prefetchedData- if the custom field type implementedCustomFieldType.getNonNullCustomFieldProvider()
-
indexFieldsWithVisibility
void indexFieldsWithVisibility(FieldValueCollector collector, Issue issue, CustomFieldPrefetchedData prefetchedData, boolean visible) Enforce implementing indexFieldWithVisibility instead of indexFields.- Specified by:
indexFieldsWithVisibilityin interfaceFieldIndexer- Parameters:
collector- the collector for collecting indexed valuesissue- that is having a document created from.prefetchedData- if the custom field type implementedCustomFieldType.getNonNullCustomFieldProvider()this reference will hold the matching value returned fromNonNullCustomFieldProvider.getCustomFieldInfo(List <Issue>)*
-