-
Notifications
You must be signed in to change notification settings - Fork 0
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
DRAFT Allows indexing to continue if an index error occurs, and add log. #3
base: pulls/v3-backport
Are you sure you want to change the base?
Conversation
@@ -206,6 +206,11 @@ private function buildIndexedDocumentsList(): ArrayList | |||
$query->where('ShowInSearch = 1'); | |||
} | |||
|
|||
// where appropriate, make sure we only show database total for this index |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a project with indexing for subsites, it was noted that the total documents in the database didn't take into account the subsite (and index) to which the document related to.
@@ -598,6 +598,11 @@ public function testEvents(): void | |||
$mock->expects($this->exactly(2)) | |||
->method('markIndexed'); | |||
|
|||
$dataObject = DataObjectFakeVersioned::create(['Title' => 'Document']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was failing - a document is needed.
|
||
$this->expectExceptionMessage('Testing failure'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change in behaviour - rather than throw an exception, we now log the error and continue.
These changes allow indexing to continue even when an individual document might fail to index and return an error. In this case, here we want the error to be clearly logged but the index process to continue.