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

After publishing a page, the queued job does not send the document for indexing #75

Closed
ssmarco opened this issue Jul 15, 2022 · 1 comment

Comments

@ssmarco
Copy link
Contributor

ssmarco commented Jul 15, 2022

This issue probably started since v1.1.0.
When a single page is published and yes the queued job is created to send the document.
However even if the queued job is completed successfully, upon further investigation the document is not posted to Elastic endpoint. It turned out that the $batch_size is null as a 3rd parameter to array_splice which does not change the original array and returns an empty array.

$job = IndexJob::create($documents);

$documentToProcess = array_splice($remainingDocuments, 0, $this->getBatchSize());

I have come up a solution using the same strategy with ReindexJob class to apply a default batch size from configuration if the value is empty. See PR here #74

@chrispenny
Copy link
Collaborator

Completed in #74

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

2 participants