When Moodle global search with Solr is worth configuring
Enable Moodle's global search with Solr when learners and staff regularly cannot find course content, forum threads or uploaded files because they do not remember where those items were posted. Global search indexes content across the site, including courses, forum posts, resources and, where configured, the text inside uploaded files, then returns results filtered by what each user is allowed to see. Solr is the search engine that stores and queries that index, and Moodle's search feature depends on it being available. The decision is worth making once the site holds enough material that browsing by course and category no longer finds things quickly, and once you have an owner for the search service.
The most important point for planning is that Solr is a separate service your organization must run. Moodle does not host it, so you need to decide where it runs, who patches it, how it is backed up and what happens when it is unavailable. Indexing is also work outside Moodle: you set the schedule on which content is picked up, you decide whether file content extraction is on, and you size the search host for the volume of content you expect. Confirm with your platform team which Solr version Moodle's current search documentation supports before you choose a deployment method, because that version and the Moodle release you run together determine the setup steps.
Permission review is the step teams most often skip. Search results must respect course enrolment, role and visibility settings, so a file that is hidden from students in a course should not appear in their results. Before you enable the feature for everyone, test with accounts from each role, including guests and users with limited access, and confirm that restricted content stays hidden. If you cannot complete that review with confidence, the risk is that search exposes material that the course structure was designed to protect.
Configuration options and when each one fits
This table compares the five decisions a team makes before turning on Moodle global search: the search engine, which content areas are indexed, whether file content is extracted, how often indexing runs and how access to results is checked. Read each row as a question to settle with your security and infrastructure owners before the first index build. Confirm the engine options and defaults in the Moodle version you run, because these settings change between releases.
| Decision | Option and trade-off | Question to answer with security and infrastructure owners |
|---|---|---|
| Search engine | Solr needs its own hosted service, with memory, disk and upgrades to manage. Choosing it moves operational work out of the Moodle application servers. | Can we host and patch a Solr service inside our network, and who owns its uptime and backups? |
| Search engine | The built-in database search needs no extra service, but it offers fewer capabilities for large sites. Confirm what the current version supports. | Is the lighter option acceptable for our content volume and search expectations? |
| Content areas indexed | Indexing more areas (forums, glossaries, resources) finds more material but widens what appears in results for every signed-in user. | Which course areas hold personal, grading or restricted material that should stay out of search? |
| File content extraction | Extracting text from PDFs and Office files makes documents findable by their words, but it copies sensitive text into the index. | Do uploaded files contain regulated data, and does the index location meet our data handling rules? |
| Indexing schedule | Frequent indexing keeps results current but adds load on the search service and the database during business hours. Less frequent runs leave new content unsearchable for longer. | What freshness do teachers and learners need, and when can the indexing load run without affecting users? |
| Access checks for results | Moodle checks each result against the user's course and activity access at search time. Any gap in these checks shows restricted content to the wrong people. | Have we tested that a learner, a teacher in another course and a guest see only what they should? |
| Search index retention | Keeping indexed copies of removed or archived content creates a second place where data persists, which may conflict with deletion requests. | How do course deletion and user erasure requests reach the search index, and who verifies it? |
How Moodle global search decides what each user sees
Moodle global search does not show a learner what is stored in the index. It shows what the learner is allowed to see at the moment of the query. Content from courses, forums and resources is first copied into a search index by Moodle's scheduled indexing tasks. When a user submits a query, the Solr engine returns matching candidates, and Moodle then checks that user's rights to each candidate before anything is displayed. The index therefore holds copies of course content, forum posts and uploaded files, and those copies must be governed like any other record of learning content, including how long they remain and who can reach the search engine directly.
Because results depend on access checks made at query time, a missing or wrong check changes what people see without any change to the index. Before rollout, confirm which search areas are enabled on your Moodle version, which capability checks each area applies to course content, forum discussions and files, and how hidden courses, group-restricted forums and role overrides are handled. Test these with at least one learner account, one teacher account and one account with a restricted role, using content you have placed in each area on purpose. Record the results, since they are the evidence a privacy or security reviewer will ask for.
The exact indexing task names, their default intervals and the capability checks applied to each search area differ between Moodle versions and can change in later releases, so confirm them against the version you run before writing access rules or setting schedules. The Moodle releases page lists the supported versions, and the release notes for your version should be checked for changes to search behavior. Treat any schedule you set as a decision to be tested, not a default you can assume.
How indexing and search requests move between Moodle and Solr
The flow starts with the scheduled indexing task, which reads course content and uploaded files from the Moodle database and file storage, then sends documents to the Solr service across the trust boundary. A learner's search goes the other way: the browser calls the Moodle web server, which queries Solr and receives candidate hits. Before anything is shown, Moodle checks access for each result against its own permissions. Check that Solr accepts traffic only from the Moodle zone and that results are filtered on Moodle's side.
Indexing and search traffic crossing the Moodle to Solr trust boundary, with the per-result access check in Moodle.
Setup sequence for Solr-backed global search
This sequence takes a Moodle site from a confirmed version and server stack to a Solr-backed global search that returns only what each user is entitled to see. Each step closes with a check, so problems surface on a non-production copy before users rely on search.
Confirm the Moodle version and server stack
Identify the Moodle version in use or planned, then check its supported PHP, database and web server requirements in the release notes for that version. Confirm the web server document root points to the correct folder for your version, since from Moodle 5.1 it must point to the /public directory. Your team and the Moodle administrator do this together. The step is done when the version, PHP build and database are written down and match the release notes for that version.
Decide where Solr runs
Choose whether Solr runs on dedicated hosts, in containers or alongside Moodle, based on your hosting model and the size of the course catalogue and file library. Decide who patches and monitors it, and where its network traffic is allowed to flow. Confirm the Solr version that the target Moodle release supports in its documentation, since the supported versions change between releases. The step is done when a written hosting decision names the owner, the network path from Moodle to Solr, and the Solr version.
Install and secure the Solr service
Install Solr on the chosen hosts, create the core Moodle will use, and restrict access so that only the Moodle web and cron servers can reach its port. Enable authentication on the Solr API and store the credentials in your secrets manager rather than in plain configuration files. Test the service with a basic health request from an allowed host and a refused request from another host. The step is done when the allowed host gets a healthy response and the blocked host cannot connect.
Configure the Solr connection in Moodle
In the Moodle administration area for global search, select the Solr search engine and enter the host, port, core name and credentials. Confirm the exact settings screens and field names in the documentation for your Moodle version, as they can change between releases. Run the connection test that Moodle provides. The step is done when the connection test passes from every Moodle web and cron node, and the search engine status shows as available.
Choose content areas and file content indexing
Decide which areas are searchable, such as courses, forums, pages, books and resources, and whether file content from uploaded documents should be indexed. Document the reason for each choice, especially for files that may contain personal or confidential data, since indexed text becomes searchable by anyone who passes the access checks. Agree with the course owners which content should stay out of search. The step is done when a signed-off list of content areas and file indexing rules exists and matches the Moodle settings.
Run an initial full index on a non-production copy
Restore a recent copy of the production database and file store to a test environment, connect it to a test Solr core, and run the initial full index from the command line or the scheduled task. Record how long the index takes, the number of documents indexed, and any errors in the logs. Check that the indexed count is close to the expected content volume. The step is done when the full index completes without fatal errors and a sample of search results matches known course content.
Verify results respect enrolment and roles
Create test accounts that represent a student with no enrolment in a course, a student enrolled in one course, a teacher, and a user with restricted access to a category. Search for terms that appear only in the restricted course and confirm each account sees only the results it is entitled to. Include a file that contains a unique phrase to test file content access. Repeat the test after any change to roles or enrolment methods. The step is done when every test account returns only its permitted results, and the results are written up as evidence.
Schedule ongoing indexing and monitoring
Set the global search indexing task and the cron schedule to suit the rate of new content, and confirm the indexing task runs on a schedule in production. Add alerts for failed indexing runs, Solr disk use, and Solr service availability in your monitoring system. Document who responds to alerts and how a full reindex is triggered after a Solr rebuild or upgrade. The step is done when scheduled runs appear in the logs, alerts fire in a controlled test, and the runbook is approved by the operations owner.
Where to run Solr for different environments
A shared server runs Solr on the same host as the Moodle web and database services. It suits a small site with light search demand and a platform team that is already responsible for the whole stack. The trade-off is that Solr competes with Moodle for memory, disk and CPU, and a fault in one service affects the others.
- Network placement: Solr listens on a local interface or a loopback address, so no search traffic crosses the network. Confirm that the Solr port is not reachable from outside the host.
- Patching: The same team usually patches the operating system, Moodle and Solr. Agree a shared change window so a Solr upgrade does not surprise the Moodle administrators.
- Index backup: The index sits on the same disk as the site. Include the Solr data directory in your regular backup job, and remember that the index can be rebuilt from Moodle content if it is lost.
- Authentication: Enable Solr authentication even on a local host, and give Moodle a dedicated Solr account with only the permissions it needs.
Ask your infrastructure team whether a shared host meets your change control rules for co-hosted services.
A dedicated search host runs Solr on its own server or virtual machine in the same data center as Moodle. This pattern separates the search workload from the learning platform, so indexing or query spikes do not slow course pages. It also gives the platform team a clear boundary for patching and capacity planning.
- Network placement: Place the search host on an internal network segment that only the Moodle application servers can reach. Restrict the Solr port with host firewall rules or network access control lists.
- Patching: Assign Solr to a named owner who receives vendor release notices and schedules updates separately from Moodle. Test each Solr version against your Moodle release before rollout.
- Index backup: Snapshot the search host or back up its data directory on a schedule that matches your recovery targets. Test a restore into a non-production host so the procedure is proven.
- Authentication: Require credentials for every request from Moodle, store them in your secrets manager, and rotate them through the same process as other service accounts.
- Monitoring: Watch disk, heap and indexing queue health on the search host, since failures here may appear to users only as missing results.
Confirm with your infrastructure team which firewall, monitoring and backup tools this host must use.
An isolated or air-gapped deployment places Moodle and Solr on a network with no route to the internet or to general corporate networks. Software, container images and updates reach the environment through an approved transfer process. This pattern fits public sector, defense-adjacent and some healthcare environments where data residency and access rules are strict.
- Network placement: Keep Solr inside the isolated enclave with no outbound internet access. Confirm which Moodle-to-Solr paths are allowed and document them for the security team.
- Patching: Build an offline update path, including package mirrors or signed media, and record who approves each transfer into the enclave. Plan patch cycles around that approval time.
- Index backup: Store backups inside the enclave or on approved media, encrypted and access-controlled. Check that backup media follows the same handling rules as the source data.
- Authentication: Use internal certificates or directory-backed credentials managed inside the enclave, since external identity services may be unreachable. Limit administrator access to named staff.
- Logging: Forward Solr and Moodle logs to a log store inside the enclave so that investigations do not depend on external services.
Ask your security and infrastructure teams which transfer, logging and certificate processes already exist for isolated systems before you choose this pattern.
Security and operational controls for the search index
A Solr index holds a copy of course content, forum posts and extracted file text, so it needs the same care as the source data. The cards below cover the controls that connect Moodle, Solr and the people who run them, and each names who should own it and what to verify in your own environment.
Restrict network access to Solr
Solr should accept connections only from the Moodle web and cron servers and from the administrators who maintain it. Keep its HTTP port off public networks and place it on a private segment or behind firewall rules that your network team manages. Verify the allowed sources by testing from a host outside that list, and confirm that the Solr admin interface is not reachable from learner networks. Owner: network or platform team.
Authenticate Moodle with a dedicated account
Create a separate Solr user or credential for Moodle, granted only the rights needed to read and write the Moodle search core. Do not reuse an administrator login or a personal account. Store the credential in your secrets system rather than in shared configuration files, and plan a rotation date. Verify that the account cannot change schema or delete other cores by attempting those actions with it. Owner: platform team with the Moodle administrator.
Review file types and extracted content
File content indexing sends uploaded documents through text extraction, so the list of file types Moodle indexes determines what leaves the file store and enters the index. Review which types are included, and remove any that your teams do not need searched. Test a sample of each included type, including password-protected or unusual files, and confirm how failures are handled. Owner: Moodle administrator with the security team.
Protect the index as sensitive data
The index holds text from courses, forums and resources, which may include personal data, grades or restricted material, even if the originals sit behind course enrolments. Treat the Solr data directory and its backups with the same classification, encryption and retention rules as the database. Confirm who can read index files at the operating system level and who receives index backups. Owner: data protection lead with the platform team.
Keep Solr and dependencies patched
Solr runs on a Java runtime and its own release cycle, separate from Moodle's six-month releases. Record the Solr version, Java version and operating system packages in your inventory, and subscribe to their security notices. Schedule patch windows in a staging copy first and re-run a search test after each change. Confirm the supported Solr version for your Moodle release before upgrading either side. Owner: platform team.
Log indexing failures and alerts
Indexing jobs can fail silently, leaving search results out of date or missing files without any visible error for users. Check the Moodle task logs and Solr logs for failed batches, timeouts and authentication errors, and forward them to your monitoring system. Set an alert for a stalled index and a named person to respond to it. Verify the alert by stopping Solr in staging and confirming that someone is notified. Owner: operations team.
Questions buyers ask before enabling Solr search
How much effort does setting up Solr search for Moodle take?
The effort depends mostly on how many courses, forums and files you index, where Solr runs, and how many people must sign off on the result. Moodle's global search needs a Solr server that Moodle can reach, a configured search engine connection in Moodle, and an initial index build that can run for a long time on a large site. Ongoing effort comes from watching index jobs, handling failed files and checking results after updates. Ask any partner to split the quote into the Solr hosting work, the Moodle configuration work, the file content indexing work and the permission testing work, so you can see which parts your own team could take on.
Can our Moodle team set up Solr search without outside help?
A team with Linux, Solr and Moodle administration experience can usually do it in-house, and the decision mostly turns on whether those skills are available for the length of the work. The hard parts are not the first install. They are sizing the Solr host, setting a sensible indexing schedule, confirming that file content extraction works for the document types your courses use, and proving that search results respect course and category access. If those skills are missing, a fixed-scope engagement can cover the build and hand over a runbook, while your team keeps ownership of day-to-day operation.
What does Solr search need from our infrastructure and security teams?
Infrastructure teams need to provide a Solr host or cluster in a network zone that both Moodle and its users' search requests can reach, with storage for index data, backups, and monitoring. Security teams need to review which service account Moodle uses to talk to Solr, how that connection is authenticated and encrypted, who can administer the Solr instance, and whether indexed file content is stored in a location covered by your data handling rules. Confirm these needs against your own network standards before scoping, and check the Solr version and Java requirements with your Solr distribution.
How long does a Solr search rollout take, and what drives that?
Duration is driven by the size of the content to index, the speed of your Solr host, how many file types need content extraction, how much testing your compliance or security reviewers want, and how many change windows you can use. A small test site can move quickly, while a large institution with many courses and archived files will need staged indexing and a longer review. Ask for a timeline that lists each milestone and what must be true before it starts, and do not accept a single number without those dependencies.
What happens to search after we upgrade Moodle?
Search is tied to the Moodle version, the search plugin and the Solr schema, so each Moodle upgrade needs a check of the search configuration before users rely on it again. Moodle core releases follow a fixed schedule, so plan for a search review in every upgrade window. Confirm with the Moodle release notes for your target version whether the search subsystem or its requirements changed, then re-run a test index on a staging copy. Keep the Solr version and its Java runtime on a supported path as well, since Moodle and Solr upgrades often happen on separate timetables.
How do we test that search results respect course permissions?
Build a permission test matrix before go-live: pick test accounts for each role, such as a student, a teacher in one course, a manager in a category, and an administrator, then search for content they should and should not see. Include hidden activities, restricted groups, private forum posts and files attached to resources that have different access rules. Run the same queries after every reindex and every upgrade, and record the results as evidence for your security or compliance reviewers. Ask any partner to deliver the test cases, the results and a retest after fixes, so the proof stays with your organization.
Limits to confirm in your environment before you commit
Moodle global search depends on a chain of versions, server requirements and network conditions that vary by site. Each card below names one limit to confirm, where the answer lives, and what to check, so the decision rests on your environment rather than on general assumptions.
Solr version support
Confirm which Solr versions the Moodle release you plan to run supports for its global search engine. Moodle's search configuration and the Solr server must agree on compatibility, and support can change between Moodle releases. Ask your implementation partner to test the exact Solr version you intend to host in a staging copy of your Moodle site before you select it for production. Record the pairing in your change log so future upgrades start from a verified combination.
Moodle releasesFile content extraction coverage
Global search can index text inside uploaded files, but only for the document types the Solr setup and Moodle's text extraction path can read. Inventory the formats your staff and faculty actually store, such as scanned PDFs, Office files and video transcripts, and test each one. Files that extract poorly will return weak or no results, which can look like a search fault to users. Treat unsupported formats as a known gap in your rollout communications.
Index behavior with large course archives
Confirm how the index grows and how long a full rebuild takes when you hold large course archives, long forums and big resource libraries. Ask for indexing benchmarks from a copy of your real content, not a demo course set. Check whether indexing runs during peak teaching hours and whether Solr memory and disk sizing leave room for growth. These numbers decide your indexing schedule and the capacity you buy.
Search notes in the upgrade guide
Read the upgrade notes for each Moodle release on your path for any change to global search, indexing tasks, search areas or the Solr connector. Search behavior can shift between releases, and a plugin or setting that worked before an upgrade may need reconfiguring afterward. Add a search regression check, covering known queries and access results, to every upgrade test plan. Schedule this review before you pick a target release.
Moodle 5.1 notesOperation in constrained or air-gapped networks
Confirm that Moodle and the Solr server can reach each other, and that every component you need, including any language or extraction tools, can be installed without outbound internet access. In a restricted network, packages and updates must come through an internal mirror or an offline transfer process. Ask your team to verify this on a network segment that matches your production restrictions, because lab tests on open networks often miss the problem.
Server requirements for the chosen version
Check the PHP, database and web server requirements for the Moodle version you run, since they set the platform your search stack sits on. Confirm the minimum PHP version, supported database versions and any web server document root change that applies. Requirements differ between major releases, so a server that is ready for one version may need work for the next. Compare the requirements with your current hosts before you size the Solr server, so hardware and OS decisions are not made on stale assumptions.
Moodle 5.3 notesHow DeployOpen scopes and delivers Moodle search with Solr
DeployOpen plans Moodle global search with Solr as a fixed-scope project in infrastructure you control. We agree the Solr hosting, indexing schedule, file content indexing and result access rules in writing, then build, test and hand over a search service your administrators can run and your compliance team can review.
How we scope
- Written scope lists which courses, forums and resource types are searchable and which are excluded.
- Solr hosting location, node sizing and network path are confirmed against your data centre or cloud account.
- Access rules for results are mapped to Moodle roles, categories and course enrolments before any build starts.
How we build
- Solr is installed and connected to your Moodle site, with the search engine and indexing settings configured in Moodle.
- Indexing schedules and file content indexing are set for your content volumes and tested against real course data in a staging copy.
- Search results are tested for each role to confirm learners see only content they are entitled to open.
How we hand over
- Documentation covers Solr configuration, index rebuild steps, scheduled task settings and the access rules in place.
- Administrators are walked through how to check index health, troubleshoot missing results and re-index content.
- Test evidence and configuration records are delivered so your security and compliance teams can review the setup.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer after handover.
- Search is retested when Moodle or Solr is upgraded, so access rules and indexing keep working after each change.
- Confirm with DeployOpen the support hours, response terms and upgrade coverage in the written scope before signing.

