-
Bug
-
Resolution: Fixed
-
Critical
-
4.0.8, 4.1.2, 4.2
When indexing the files from mod_data, the files being attached to the search document are being looked for using the record id as the file item id, when the files are actually created using the content id by the file field.
Steps to reproduce
- Turn on Elasticsearch with Tika or Solr with file support and configure the site for global search with file indexing support
- Create a database activity in a course
- Create a file field in the database activity
- Create other fields if you want for adding context to the activity
- Create multiple entries with PDF files attached to them
- Run the site indexing CLI script or run cron multiple times:
- search/cli/indexer.php --reindex --force
- Check the file areas page(/admin/searchareas.php) to validate that the database entries have been indexed
- Run global search queries on text that is included in the PDF files
Observed behavior
Some files may be returned, and some others not.
Expected outcome
Any text from any indexed file should be searchable and should appear in the results.