public class IssueLinkIndexer extends Object implements FieldIndexer
LABELS_NO_VALUE_INDEX_VALUE, NO_VALUE_INDEX_VALUE
Constructor and Description |
---|
IssueLinkIndexer(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.
|
public IssueLinkIndexer(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()
getId
in interface FieldIndexer
public String getDocumentFieldId()
getDocumentFieldId
in interface FieldIndexer
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
issue
- the issue with the link (unused).public void addIndex(org.apache.lucene.document.Document doc, Issue issue)
addIndex
in interface FieldIndexer
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-2015 Atlassian. All Rights Reserved.