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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Fix Elastica\Document undefined method #1476

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Monolog/Formatter/ElasticaFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ protected function getDocument(array $record): Document
{
$document = new Document();
$document->setData($record);
$document->setType($this->type);
$document->setOpType($this->type);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The opType is the operation type and not at all the same as types in ES<7. See https://github.com/ruflin/Elastica/blob/b1b6c980cce2ffc3f278e0d3d02e61b174cee52e/src/AbstractUpdateAction.php#L186

$document->setIndex($this->index);

return $document;
Expand Down