Class IssueLinkIndexer
java.lang.Object
com.atlassian.jira.search.issue.index.indexers.impl.IssueLinkIndexer
- All Implemented Interfaces:
FieldIndexer
Replaces
IssueLinkIndexer
.- Since:
- 10.6
-
Field Summary
Fields inherited from interface com.atlassian.jira.search.issue.index.indexers.FieldIndexer
NO_VALUE_INDEX_VALUE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeclares the fields to be added to the index schemagetId()
void
indexFields
(FieldValueCollector collector, Issue issue, CustomFieldPrefetchedData prefetchedData) 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.boolean
isFieldVisibleAndInScope
(Issue issue) We have to always index the link because we want to support the use of links for system-level issue relationships implemented by system links without linking enabled.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.jira.search.issue.index.indexers.FieldIndexer
skipsIndexingNull
-
Constructor Details
-
IssueLinkIndexer
-
-
Method Details
-
getId
- Specified by:
getId
in interfaceFieldIndexer
- Returns:
- the String representation of the field id that this indexer is indexing, this must be unique for each independent FieldIndexer. If the Indexer does not represent a System or Custom field in Jira this should still return a unique string that describes the indexer.
-
getFields
Description copied from interface:FieldIndexer
Declares the fields to be added to the index schema- Specified by:
getFields
in interfaceFieldIndexer
-
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.- Specified by:
indexFields
in interfaceFieldIndexer
- Parameters:
collector
- the collector for collecting indexed valuesissue
- 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 implementedCustomFieldType.getNonNullCustomFieldProvider()
this reference will hold the matching value returned fromNonNullCustomFieldProvider.getCustomFieldInfo(List <Issue>)
-
isFieldVisibleAndInScope
We have to always index the link because we want to support the use of links for system-level issue relationships implemented by system links without linking enabled.- Specified by:
isFieldVisibleAndInScope
in interfaceFieldIndexer
- Parameters:
issue
- the issue with the link (unused).- Returns:
- true always.
-