Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Triggers callbackArticleMetadataChanged, callbackSubmissionFilesChanged do not work #6

Open
mpbraendle opened this issue Nov 22, 2023 · 0 comments

Comments

@mpbraendle
Copy link

stable-3.3.0 and main:

Push indexing: Changing metadata or a submission file for a single article doesn't execute an indexing transaction. Therefore, a new published article won't be indexed automatically and won't be findable.

LucenePlugin: both function callbackArticleMetadataChanged and callbackSubmissionFilesChanged call callbackArticleChangesFinished(null, null);

function callbackArticleChangesFinished calls

$result -> $solrWebService->pushChangedArticles(5);

classes/SolrWebService.inc.php: function pushChangedArticles accepts two parameters:

function pushChangedArticles($batchSize = SOLR_INDEXING_MAX_BATCHSIZE, $journalId = null)

So, in that case, $journalId is not defined.

function pushChangedArticles calls _indexingTransaction($sendXmlCallback, $batchSize = SOLR_INDEXING_MAX_BATCHSIZE, $journalId = null)

function indexingTransaction gets a

$submissionsIterator = Services::get('submission')->getMany(['contextId' => $journalId , 'status' => STATUS_PUBLISHED]);

if $journalId is null, $submissionsIterator is empty and the foreach loop won't iterate.
$submissionArray therefore will be empty and no $articleXml will be generated ...

Possible solution:

  • either pass journalId of changed submission somehow
  • or get all articles that have SOLR_INDEXINGSTATE_DIRTY and index them.

Workaround:
Reindex all journals nightly with a cron job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant