Elastic-Model
view release on metacpan or search on metacpan
lib/Elastic/Model/Index.pm view on Meta::CPAN
If you are indexing to the new index at the same time as you
are reindexing, you may get document conflicts. You can handle the conflicts
with a coderef callback, or ignore them by by setting C<on_conflict> to
C<'IGNORE'>:
$index->reindex( 'myapp_v2', on_conflict => 'IGNORE' );
Similarly, you can pass an C<on_error> handler which will handle other errors,
or all errors if no C<on_conflict> handler is defined.
See L<Search::Elasticsearch::Bulk/Using-callbacks> for more.
=item uid_on_conflict / uid_on_error
These work in the same way as the C<on_conflict> or C<on_error> handlers,
but are passed to L</repoint_uids()> if C<repoint_uids> is true.
=item quiet
By default, L</reindex()> prints out progress information. To silence this,
set C<quiet> to true:
lib/Elastic/Model/Index.pm view on Meta::CPAN
These are the same as the C<uid_on_conflict> and C<uid_on_error> handlers
in L</reindex()>.
=back
=head2 doc_updater()
$coderef = $index->doc_updater( $doc_updater, $uid_updater );
L</doc_updater()> is used by L</reindex()> and L</repoint_uids()> to update
the top-level doc and any UID attributes with callbacks.
The C<$doc_updater> receives the C<$doc> as its only attribute, and should
return the C<$doc> after making any changes:
$doc_updater = sub {
my ($doc) = @_;
$doc->{_index} = 'foo';
return $doc
};
( run in 4.872 seconds using v1.01-cache-2.11-cpan-9b1e4054eb1 )