JQL Query parser

Hi

How to perform the partial or full text search from the lucene index directory using JQL functionality.

Ex: issue in mymethod("fieldname","testing")

The above method has to return all the fields whichever contains the word "testing".

Here is my code:

Term term = new Term("fieldname", "testing");

Query query = new TermQuery(term);

The above code is returning only when the field contains "testing". It is not searching the whole sentence.

I tried below one for partinal search

Term term = new Term("fieldname", "test*");

Query query = new WildcardQuery(term);

The above one is not supporting the uppercase. If i give "TEST*" its not giving anything eventhough i have fields in index.

Moreover it searches only the starting word, not the whole sentence

Is there any wrong in that? or will the lucene search provide this functionality?

Any suggestion from the experts?

1 answer

1 vote

I'm confused. Are you trying to use JQL in your code, or is your code trying to search the index directly? You seem to be trying to do both at the same time, which is nonsense - you either use JQL and let the back-end handle it, or you write code that directly accesses the index (and hence JQL is pointless because it's not for searching lucene)

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,293 views 14 20
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot