Class IssueLinkIndexer

java.lang.Object
com.atlassian.jira.issue.index.indexers.impl.BaseFieldIndexer
com.atlassian.jira.issue.index.indexers.impl.IssueLinkIndexer
All Implemented Interfaces:
FieldIndexer

@Deprecated(since="10.4", forRemoval=true) public class IssueLinkIndexer extends BaseFieldIndexer
Deprecated, for removal: This API element is subject to removal in a future version.
since 10.4. Use IssueLinkIndexer instead.
  • Constructor Details

    • IssueLinkIndexer

      public IssueLinkIndexer(FieldVisibilityManager fieldVisibilityManager, IssueLinkManager issueLinkManager)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • createValue

      public static String createValue(Long issueLinkTypeId)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a term query value based only on the link type.
      Parameters:
      issueLinkTypeId - the id of the issue link type.
      Returns:
      the value as found in the index.
    • createValue

      public static String createValue(Long issueLinkTypeId, Direction direction)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a term query value based on the link type and direction.
      Parameters:
      issueLinkTypeId - the id of the issue link type.
      direction - the direction of the link.
      Returns:
      the value as found in the index
    • createValue

      public static String createValue(Long issueLinkTypeId, Direction direction, Long otherIssueId)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a term query value based on the link type, direction and destination issue.
      Parameters:
      issueLinkTypeId - the id of the issue link type.
      direction - the direction of the link.
      otherIssueId - the id of issue the link links to.
      Returns:
      the value as found in the index
    • getId

      public String getId()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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.
    • getDocumentFieldId

      public String getDocumentFieldId()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      the String representation of the primary field id that will be added to the Document as a result of a successful call to the FieldIndexer.addIndex(Document, Issue, CustomFieldPrefetchedData) method.
    • isFieldVisibleAndInScope

      public boolean isFieldVisibleAndInScope(Issue issue)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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 interface FieldIndexer
      Overrides:
      isFieldVisibleAndInScope in class BaseFieldIndexer
      Parameters:
      issue - the issue with the link (unused).
      Returns:
      true always.
    • addIndex

      public void addIndex(org.apache.lucene.document.Document doc, Issue issue)
      Deprecated, for removal: This API element is subject to removal in a future version.
      We index the links in 3 ways. First, we index just the link type, so queries can be done like see if something is a duplicate of another issue. Second, we index the link type with a direction flag which enables queries of all issues that are blockers of other issues. Third, we link the link type plus direction plus the OTHER issue id so that we can do a search like "all cloners of this issue" (or all cloners of other issues!).
      Parameters:
      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 searchable