Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Approvals Plugin: Atlassian Jira 8.13.6 is returning empty results with LuceneSearch


I am working on Approvals plugin with Jira 8.13.6.   Was stuck with Lucene search functionality where need to get/search the list of issues associated with an artifact from BitBucket/Git.

Requirement: To Get the List of Issues by LuceneSearch with "Artifacts" as input. 

Ex: http://localhost:PORTNO/context_path/repos/rep_1/Branch_name/file/file_name.txt. (sample Path)

Query: Artifacts in ("http://localhost:PORTNO/context_path/repos/rep_1/Branch_name/file/file_name.txt?at=refs/head/branch_name", "http://localhost:PORTNO/context_path/repos/rep_1/Branch_name/file/file_name.txt?at=812ssjlsjl778")

Note: 812ssjlsjl778 is the git revision commit id.

This jql query is returning empty results only in  Jira 8.13.6 but with

Jira 7.x version and Lucen dependency 3.3 version same JQL query is working perfectly.


Troubleshoot: Verified whether  Lucene is correctly indexing my inputs passed to search functionality and Lucene is correctly indexing the input. 

Lucene dependency version: 7.3.1

Jira: 8.13.6

Request to please let me know your inputs or thoughts on this? Please let me know if you need more information.


Thanks in Advance.



1 answer

Can anyone please look into this and give your thoughts on this. Thankyou

Hello All, I have identified the issue

We are not getting search results because Lucene is tokenizing the text data as below which should not happen in our use case because of  this search functionality is returning 0 results as the search test data is not matching to the Lucene indexed value. Refer below screen shot.Capture.JPG

Lucene by-default uses analyzer as StandardAnalyzer  which  is tokenizing the data.

Since use case is about search functionality using file paths we need to use

Approach 1. specific analyzer other than StandardAnalyzer or

Approach 2. need to inform to Lucene that tokenize but as a single token

 Lucene, is the process of converting field text into its most fundamental indexed representation, terms. These terms are used to determine what documents match a query during searching. Based on this found that String Filed is not analyzed  and hold the value into single token.


doc.add(new StringField(getDocumentFieldId(), cutomizeindexableURI(uri), Field.Store.YES));

With Approach 2, replaced the "Text Field" with "String Field" we are able to successfully get the search results.

StringField: String field is indexed but not analyzed. Entire string value is stored as single token. It is useful to store ids, phone numbers, country fields etc.,

TextField: Text field is indexed and tokenized, without term vectors. If you want full-text searching use this field.


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Apps & Integrations

Marketplace Partner Spotlight: Fine Software

Happy New Year, everybody! What better way to kick off 2022 than with a new Marketplace Partner Spotlight ✨ This month, we're getting to know Daniel Franz, co-founder of Fine Software. Fine Software ...

409 views 2 15
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you