public class IssueLinkIndexer extends BaseFieldIndexer
fieldVisibilityManager
LABELS_NO_VALUE_INDEX_VALUE, NO_VALUE_INDEX_VALUE
Constructor and Description |
---|
IssueLinkIndexer(FieldVisibilityManager fieldVisibilityManager,
IssueLinkManager issueLinkManager) |
Modifier and Type | Method and Description |
---|---|
void |
addIndex(org.apache.lucene.document.Document doc,
Issue issue)
We index the links in 3 ways.
|
static String |
createValue(Long issueLinkTypeId)
Creates a term query value based only on the link type.
|
static String |
createValue(Long issueLinkTypeId,
Direction direction)
Creates a term query value based on the link type and direction.
|
static String |
createValue(Long issueLinkTypeId,
Direction direction,
Long otherIssueId)
Creates a term query value based on the link type, direction and destination issue.
|
String |
getDocumentFieldId() |
String |
getId() |
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.
|
compareTo, equals, hashCode, indexDateField, indexDependentEntities, indexFoldedKeyword, indexKeyword, indexKeywords, indexKeywordWithDefault, indexKeywordWithDefault, indexLocalDateField, indexLongAsKeyword, indexLongAsPaddedKeywordWithDefault, indexLongAsPaddedKeywordWithDefault, indexText, indexTextForSorting
public IssueLinkIndexer(FieldVisibilityManager fieldVisibilityManager, IssueLinkManager issueLinkManager)
public static String createValue(Long issueLinkTypeId)
issueLinkTypeId
- the id of the issue link type.public static String createValue(Long issueLinkTypeId, Direction direction)
issueLinkTypeId
- the id of the issue link type.direction
- the direction of the link.public static String createValue(Long issueLinkTypeId, Direction direction, Long otherIssueId)
issueLinkTypeId
- the id of the issue link type.direction
- the direction of the link.otherIssueId
- the id of issue the link links to.public String getId()
public String getDocumentFieldId()
Document
as a result of a successful call to the
FieldIndexer.addIndex(org.apache.lucene.document.Document, com.atlassian.jira.issue.Issue)
method.public boolean isFieldVisibleAndInScope(Issue issue)
isFieldVisibleAndInScope
in interface FieldIndexer
isFieldVisibleAndInScope
in class BaseFieldIndexer
issue
- the issue with the link (unused).public void addIndex(org.apache.lucene.document.Document doc, Issue issue)
doc
- the lucene document that should be modified by adding relevant fields to.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 searchableCopyright © 2002-2019 Atlassian. All Rights Reserved.