Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-54992

SOLR engine should check core's maxBooleanClauses value

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1, 3.3.1
    • Fix Version/s: None
    • Component/s: Global search
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_33_STABLE

      Description

      The maxBooleanClauses setting in SOLR's core config (solrconfig.xml) is very important for large sites! If you have category-level roles, and large numbers of courses within the categories, Moodle generates a horrifically long search string (contextid:(0 OR 1 OR 2 OR 3 OR 4.. etc etc etc)).

      SOLR just fails if this is over 1024 by default, and the error page isn't pretty for users!
      I think Moodle should check what the value of maxBooleanClauses (if that is even possible via the API, I am no SOLR expert) and not attempt to query more context ids than that (fail with a proper moodle_exception, rather than that nasty long string and SOLR error).

      To check this out, create 1025 courses in a category, and give a non-admin full access to that category, then try to search.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  2 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated: