Details
-
Suggestion
-
Resolution: Unresolved
-
None
-
1
-
7
-
Description
NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.
To Reproduce:
Set com.atlassian.jira.issue.search.providers to DEBUG to see how JIRA converts JQL into Lucene queries.
Create two issues with summaries:
Placer One: MBL-RFT-00063
Placer One: MBL-RFTO-000045
MBL-
Search in navigator:
summary ~ "\"Placer One: MBL-*\""
Converted Lucene query:
+pq_support_summary:"Placer One MBL"
Results:
As you can see above, JIRA actually removes the Wildcard character when generating the Lucene query.
The removal of the Wildcard character makes sense because Lucene does not support wild card searches for phrases. See official lucene documentation for reference.
- Wildcard Searches
Lucene supports single and multiple character wildcard searches within single terms (not within phrase queries).
When you put \" \" it forces JIRA to convert the search as a phrase, instead of individual terms. The phrase "Placer One: MBL" matches the ticket's summary.
MBL-R
Search in navigator:
summary ~ "\"Placer One: MBL-R*\""
Converted Lucene query:
+pq_support_summary:"Placer One MBL R"
Again, notice how JIRA removes the wildcard character as its not supported.
This search fails because the phrase "Placer One MBL R" doesn't match the ticket summary. (that extra a without the -!)
Workaround:
One workaround is to search on a per-term basis (so wild cards can be used) instead of searching with an entire phrase. So you need to remove the escaped inverted commas.
Here's some sample JQL that successfully returns the issues:
summary ~ "Placer One MBL R*"
summary ~ "Placer One MBL RT*"
summary ~ "Placer One M* R*"
summary ~ "Placer One M* RFT*"
Notice how removing the \" \" from the search tells Lucene to search on a per-term basis, allowing us to use the trailing wildcard characters.
Suggestion:
This is fixed in Lucene 4.8.0 JIRA 6.4 is on Lucene 3.3.0. In future versions use 4.8.0 to allow for more dynamic search functions with JQL.
Attachments
Issue Links
- is related to
-
JRASERVER-65455 JQL search does not work for characters in between special characters like "-"
- Gathering Impact
- relates to
-
JRACLOUD-43405 Wildcards not supported in phrases.
- Closed
- mentioned in
-
Page Loading...