Practical JIRA Plugins by Matthew B. Doar

Practical JIRA Plugins by Matthew B. Doar

Author:Matthew B. Doar [Matthew B. Doar]
Language: eng
Format: epub, pdf
Tags: COMPUTERS / Programming Languages / Java
ISBN: 9781449315474
Publisher: O'Reilly Media
Published: 2011-07-21T16:00:00+00:00


Figure 4-1. Custom Field Types and Searchers

The next section covers some of the underlying mechanisms of how searchers work. An understanding of this is helpful when you come to implement and debug your own custom field searcher, but if you just want to quickly create a searcher for your own custom field type, skip ahead to the examples that start in the section A Simple Searcher.

How Searchers Work

For performance reasons JIRA almost never queries its underlying database directly. Instead, it creates indexes of the necessary data using the popular Lucene search tool with one Lucene Document per JIRA issue. These indexes are updated when an issue changes or when the entire Lucene index is rebuilt. JIRA then uses these much faster Lucene indexes to search for Documents that match a query and then returns the related JIRA issues.

A custom field searcher defines both what should be added to each Lucene Document in the index, and also the Lucene query to run against the index when searching for issues.

JIRA has its own query language named JQL (JIRA Query Language) which is used to generate these Lucene queries. The JQL syntax resembles the more familiar database query language SQL. You enter constraints in the Issue Navigator simple search screen, for example by selecting the TEST project and a status of Open. From these constraints JIRA creates a JQL query. The advanced search screen shows the JQL query directly, in this case:

project = TEST and status = Open

It’s worth noting that you can also create plugins that provide new JQL functions for searching both fields and also the rest of JIRA’s data. See the section Further Reading for links to more information about this.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.