is uncommented and I cleared the cache/_db/ multiple times.
When I run php tools/rebuildSearchIndex.php, the scripts runs without errors, but words from the PDF files are not included (I checked the database table submission_search_keyword_list) and tested it on the website.
Then, I checked the submission files and all files that where originally .pdf files are now .txt files in the submission folder. Changing the index line in the config.inc.php to
I drilled a little further and found out that OJS does not find any submission files associated with the articles.
The code is in the classes/search/ArticleSearchIndex.inc.php (watch out OJS 3.1.2.1 code!):
if ($hookResult === false || is_null($hookResult)) {
$fileDao = DAORegistry::getDAO('SubmissionFileDAO');
import('lib.pkp.classes.submission.SubmissionFile'); // Constants
// Index galley files
$files = $fileDao->getLatestRevisions( <- this returns with 0 elements
$article->getId(), SUBMISSION_FILE_PROOF
);
foreach ($files as $file) {
if ($file->getFileId()) {
self::submissionFileChanged($article->getId(), SUBMISSION_SEARCH_GALLEY_FILE, $file->getFileId());
// Index dependent files associated with any galley files.
$dependentFiles = $fileDao->getLatestRevisionsByAssocId(ASSOC_TYPE_SUBMISSION_FILE, $file->getFileId(), $article->getId(), SUBMISSION_FILE_DEPENDENT);
echo "Got dep files\n";
foreach ($dependentFiles as $depFile) {
if ($depFile->getFileId()) {
self::submissionFileChanged($article->getId(), SUBMISSION_SEARCH_SUPPLEMENTARY_FILE, $depFile->getFileId());
}
}
}
}
I wil investigate further, but perhaps you just know what could be the problem.
Edit: Okay! Now I get an idea! This is a problem when importing articles with only galleys! Since there are no files in the “proof” (are these the files in the "production ready segment?), OJS does not search for the uploaded galleys. Is this a bug?
Edit 2: If this is a bug, then it is still present in the current version.
Edit 3: Ah! I found it! It’s not a bug! I gave in my upload file stage=final, but it should have been proof. So, besides that I am stupid, what is the actual difference between proof and final?