After switching to OpenSearch on Jira, the JQL query "Team is/is not EMPTY" gives "An unknown error occurred while trying to perform a search"

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: 11.3.4, 11.3.6
    • Component/s: Search - Search API
    • None
    • 11.03
    • 1
    • Severity 3 - Minor

      Issue Summary

      After switching to OpenSearch on Jira, the JQL query "Team is/is not EMPTY" gives "An unknown error occurred while trying to perform a search".

      Team is the custom field coming from Advanced Roadmap for Jira.

      Steps to Reproduce

      1. Switch to OpenSearch 2.19.4 on Jira 11.3.4
      2. Run the JQL query "Team is/is not EMPTY"
      3. JQL hits this cluster-level limit( 1024 boolean clauses per query):
        2026-05-20 16:53:09,402+0200 http-nio2-8080-exec-18 ERROR xxxx00 1013x379971x1 jpi93p 10.249.14.103 /rest/issueNav/1/issueTable [c.a.j.p.i.service.issuetable.DefaultIssueTableService] Error searching
        com.atlassian.jira.search.opensearch.exception.OpenSearchSearchException: Failure searching from OpenSearch
        org.opensearch.client.opensearch._types.ErrorResponse: {"error":{"phase":"query","failed_shards":[{"shard":0,"index":"jira-issues-20260518123610","node":"AD01tvfNSVSmayZbXzDYFQ","reason":{"type":"query_shard_exception","reason":"failed to create query: maxClauseCount is set to 1024","index":"jira-issues-20260518123610","index_uuid":"RKIsjRDiS9yIzMen4M7d4g","caused_by":{"type":"too_many_clauses","reason":"too_many_clauses: maxClauseCount is set to 1024"}}}],"grouped":true,"caused_by":{"reason":"too_many_clauses: maxClauseCount is set to 1024","type":"too_many_clauses"},"reason":"all shards failed","root_cause":[{"reason":"too_many_clauses: maxClauseCount is set to 1024","type":"too_many_clauses"}],"type":"search_phase_execution_exception"},"status":400}
        

      Expected Results

      Search should complete without an error.

      Actual Results

      It gives "An unknown error occurred while trying to perform a search".

      Workaround

      If feasible, you may increase the indices.query.bool.max_clause_count setting on your OpenSearch cluster. This is a cluster-level setting applied directly to OpenSearch (not to Jira).

      Step 1 — Find your OpenSearch connection details
      Check your jira-config.properties file for:

      opensearch.http.url=https://your-opensearch-host:9200
      opensearch.username=your_username
      opensearch.password=your_password
      

      Step 2 — Apply the new setting
      From any machine with network access to the OpenSearch cluster (e.g., one of your Jira nodes), run:

      curl -X PUT "https://<OPENSEARCH_HOST>:<PORT>/_cluster/settings" \
           -u <username>:<password> \
           -H "Content-Type: application/json" \
           -d '{
        "persistent": {
          "indices.query.bool.max_clause_count": 2048
        }
      }'
      

      Replace <OPENSEARCH_HOST>:<PORT>, <username>, and <password> with the values from your jira-config.properties.

      Note: If you are using AWS OpenSearch Service (managed), you cannot use the REST API for this. Instead, go to AWS Console → OpenSearch Service → Your Domain → Edit → Advanced cluster settings and add indices.query.bool.max_clause_count: 2048.

      Step 3 — Verify

      curl -X GET "https://<OPENSEARCH_HOST>:<PORT>/_cluster/settings" \
           -u <username>:<password> \
           -H "Accept: application/json"
      

      You should see "indices.query.bool.max_clause_count": "2048" in the persistent section.

      Step 4 — Test
      Re-run your Team is EMPTY JQL query in Jira. It should now return results without errors. No Jira restart or reindex is required.

              Assignee:
              Unassigned
              Reporter:
              Deepak Kumar
              Votes:
              4 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: