Skip to content

Triggers callbackArticleMetadataChanged, callbackSubmissionFilesChanged do not work #6

Description

@mpbraendle

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions