Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-66270

Optimise permission queries for searches

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Fixed
    • 7.10.0
    • JQL
    • None
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      Our permission searches used with Lucene are sub optimal now.

      The inefficiencies include:

      1. Creating many single TermQueries connected with OR operator. 
      2. Adding project queries with additional constraints when project query without constraint is already in the query. eg projid:123 OR (projid:123 AND reporter:USERNAM). 
      3. Unnecessary nesting single clause queries. Instead of on query we create two Boolean queries eg (+(projid:123)) this is equal to projid:123

      This is problematic as permission query is evaluated against every single segment of Lucene index. This means that JIRA searches degrades when new segments are added. Addition of segments happen when:

      1. Issues are modified or added 
      2. Background reindex is performend

      Number of segments is reduced to 1 when full foreground reindex is done. 

      We can eliminate above inefficiencies and rewrite multiple term queries into single MultiTermQuery. 

      Attachments

        Issue Links

          Activity

            People

              gtanczyk Grzegorz Tanczyk (Inactive)
              ajakubowski Adam Jakubowski (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: