J tricks - Little JIRA Tricks
  • Home
  • Plugins ↓
    • JQL Tricks Plugin
      • JQL Tricks Plugin - Cloud
        • JQLT Cloud Installation
        • JQLT Cloud Configuration
        • JQLT Cloud Usage
        • JQLT Cloud License
        • JQLT Cloud FAQ
      • JQL Tricks Plugin - DC
        • JQLT DC Installation
        • JQLT DC Configuration
        • JQLT DC Usage
          • JQLT Issue Functions
          • JQLT Subtask Functions
          • JQLT Links Functions
          • JQLT Development Functions
          • JQLT Worklog Functions
          • JQLT Project Functions
          • JQLT Component Functions
          • JQLT Version Functions
          • JQLT Group Functions
          • JQLT User Functions
          • JQLT Date Functions
        • JQLT DC License
        • JQLT DC FAQ
        • JQLT DC Known Issues
        • JQLT DC Performance
      • JQL Tricks Cloud Migration
    • Simplified Planner
      • J-Planner Installation
      • J-Planner Configuration
      • J-Planner Usage
        • Creating a plan
        • Editing a plan
        • Deleting a plan
        • Viewing a plan
        • Modifying a plan
      • J-Planner FAQ
    • Atla-Search Plugin
      • Atla-Search Installation
      • Atla-Search Configuration
      • Atla-Search Usage
      • Atla-Search License
      • Atla-Search FAQ
    • Heroku for Compass App
      • Heroku for Compass Installation
      • Heroku for Compass Configuration
      • Heroku for Compass Usage
    • Copy to subtask Plugin
    • All Plugins
  • Tutorials
  • The Book
  • Contact Us
  • Home
  • Plugins ↓
    • JQL Tricks Plugin
      • JQL Tricks Plugin - Cloud
        • JQLT Cloud Installation
        • JQLT Cloud Configuration
        • JQLT Cloud Usage
        • JQLT Cloud License
        • JQLT Cloud FAQ
      • JQL Tricks Plugin - DC
        • JQLT DC Installation
        • JQLT DC Configuration
        • JQLT DC Usage
          • JQLT Issue Functions
          • JQLT Subtask Functions
          • JQLT Links Functions
          • JQLT Development Functions
          • JQLT Worklog Functions
          • JQLT Project Functions
          • JQLT Component Functions
          • JQLT Version Functions
          • JQLT Group Functions
          • JQLT User Functions
          • JQLT Date Functions
        • JQLT DC License
        • JQLT DC FAQ
        • JQLT DC Known Issues
        • JQLT DC Performance
      • JQL Tricks Cloud Migration
    • Simplified Planner
      • J-Planner Installation
      • J-Planner Configuration
      • J-Planner Usage
        • Creating a plan
        • Editing a plan
        • Deleting a plan
        • Viewing a plan
        • Modifying a plan
      • J-Planner FAQ
    • Atla-Search Plugin
      • Atla-Search Installation
      • Atla-Search Configuration
      • Atla-Search Usage
      • Atla-Search License
      • Atla-Search FAQ
    • Heroku for Compass App
      • Heroku for Compass Installation
      • Heroku for Compass Configuration
      • Heroku for Compass Usage
    • Copy to subtask Plugin
    • All Plugins
  • Tutorials
  • The Book
  • Contact Us

ClauseTooComplexSearchException

Working around com.atlassian.jira.issue.search.ClauseTooComplexSearchException


Are you getting the following exception when you are running a JQL Tricks function?
​
2016-11-29 02:16:42,245 http-nio-80-exec-116 ERROR ra185165 136x31430237x9 6e0p70 153.53.2.125,192.127.253.68 /rest/issueNav/1/issueTable [c.a.j.p.i.service.issuetable.DefaultIssueTableService]com.atlassian.jira.issue.search.ClauseTooComplexSearchException: A the following query was too complex to generate a query from: {issue in functionName()}

Then you are running into
https://jira.atlassian.com/browse/JRA-19350. 

As you can see in the comment posted by Jozsef, you are hitting as limit set by Apache Lucene. This limit is not extendible by the JQL Tricks plugin, as it is handled in the JIRA core code. 

Having said that, there is an easy workaround. JIRA has an advanced property, named jira.search.maxclauses, which determines the maximum number of clauses possible in a JQL query. And its default value is 65000. If you have a query that potentially returns more than 65K results, you can override the property to have a bigger value, depending on the size of the resultset you have. 

Overriding the property can be done by adding the aforementioned property in jira-config.properties file, as mentioned at https://confluence.atlassian.com/jirakb/how-to-edit-the-jira-config-properties-file-317194938.html. 

In short, following are the steps:


  1. Create jira-config.properties file under <jira-home> directory, if it doesn't already exist.
  2. Add the jira.search.maxclauses property with the new value:

    jira.search.maxclauses = 100000

    Replace 100000 with a reasonable value for your environment.
  3. Restart JIRA

After the above steps, the function will start working again.

If you need any assistance with these stops, or if the issue is not solved even after following these steps, please raise a support ticket in our JIRA.

PS: Don't forget to watch JRA-19350 for any future updates on that ticket from Atlassian.

SUPPORT
APPS
TUTORIALS
THE BOOK
© J-Tricks