In the 13 – 15 releases Opencast still keeps two completely different search indices
- Elasticsearch on the Admin node (used by the Admin UI)
- A local Solr core on every Presentation node (used by /search and the public player)
Re-building the first one does NOT touch the second one.
If you want to “refresh” what the Presentation node delivers you have to rebuild the
public (external) index instead.
Below is the procedure that Opencast’s own documentation and the dev-list recommend.
Everything can be done from the shell; no GUI clicks are required.
────────────────────────────────────────────────────────────────────────
- Find where Solr stores its data on the presentation host
────────────────────────────────────────────────────────────────────────
grep solr.dir $OPENCAST_HOME/etc/custom.properties
→ org.opencastproject.search.solr.dir=${felix.data}/solr
The default locations are
• Tar/zip install … $OPENCAST_HOME/data/solr
• Debian/RPM package /var/lib/opencast/solr
────────────────────────────────────────────────────────────────────────
2) Stop Opencast on that Presentation node
────────────────────────────────────────────────────────────────────────
sudo systemctl stop opencast # for systemd installations
or
$OPENCAST_HOME/bin/opencast stop
────────────────────────────────────────────────────────────────────────
3) Delete the index directory
────────────────────────────────────────────────────────────────────────
rm -rf ${felix.data}/solr/*
(do NOT remove the directory itself, only its content)
────────────────────────────────────────────────────────────────────────
4) Start Opencast again
────────────────────────────────────────────────────────────────────────
sudo systemctl start opencast
or
$OPENCAST_HOME/bin/opencast start
At this point the Solr core is empty.
It will be filled after the next step.
────────────────────────────────────────────────────────────────────────
5) From the Admin node trigger a rebuild of the External/Public index
────────────────────────────────────────────────────────────────────────
curl -u admin:opencast -X POST
'http://ADMIN-HOST:8080/api/internal/externalIndex/rebuild'
If you prefer the helper script that ships with Opencast:
$OPENCAST_HOME/bin/index --external rebuild
(You can of course do this via the Admin-UI as well:
System → Tools → “External/Public Index” → Rebuild)
────────────────────────────────────────────────────────────────────────
6) Watch the jobs until finished (optional)
────────────────────────────────────────────────────────────────────────
curl -u admin:opencast
'http://ADMIN-HOST:8080/services/jobs.json?type=external_index'
or open the Admin-UI ▸ “Jobs” and filter for “external_index”.
When the jobs are done the Presentation node’s Solr index is fully rebuilt and
all episodes are again available for public playback.
────────────────────────────────────────────────────────────────────────
FAQ / Notes
────────────────────────────────────────────────────────────────────────
• You must delete the index directory on every presentation node first.
Otherwise old/invalid data survive.
• Rebuilding the Admin-UI index (search-index / Elasticsearch) does not send
any data to presentation nodes; you have to do the steps above.
• If you only changed a handful of episodes and just want Solr to notice the
change you could also tell Solr to reload its core:
curl 'http://PRESENTATION-HOST:8080/solr/ocexternaladmin/replication?command=reload'
– but for a full “clean slate” use the procedure outlined above.
That’s all – the Solr index on the Presentation node is now up-to-date again.