You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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.
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.
Lucene dependency version: 7.3.1
Request to please let me know your inputs or thoughts on this? Please let me know if you need more information.
Thanks in Advance.
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.
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.