Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,459,127
Community Members
 
Community Events
176
Community Groups

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

Edited

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.

Capture2.JPG

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
TAGS

Atlassian Community Events