Install
Works with Drupal: 8.xUsing dev releases is not recommended, except for testing.
Using Composer to manage Drupal site dependencies
Alternative installation files
Release notes
Drupal 8 version of MongoDB Indexer.
MongoDB Indexer uses events instead of hooks to communicate between interested modules.
Example EventSubsriber implementation at Example section.
FEATURES
--------
* Selectable content types to be sent to MongoDB including custom entities,
nodes, comments, taxonomy, users, and files.
* Ability to re-indexing a single node content type or a single bundle of
a custom entity.
* Re-indexing operation are separated from normal indexing operation.
* Flexibility in setting up PHP MongClient connection in settings.php.
* Support for a single MongoDB instance or a Replica Set.
SPONSORS
--------
This project has been sponsored by:
* Exove Ltd a leading open source web design and
development company in Finland and other Nordic countries, Baltics,
and the UK.
EXAMPLE
--------
namespace Drupal\video\EventSubscriber;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class VideoSubscriber implements EventSubscriberInterface {
static function getSubscribedEvents() {
$events['mongodb_indexer.build'][] = array('onDocumentBuild', 0);
return $events;
}
public function onDocumentBuild($event) {
$document = $event->getDocument();
$document->field_example = 'I am example';
$event->setDocument($document);
}
}