Skip to content

Latest commit

 

History

History
54 lines (33 loc) · 3.11 KB

events.md

File metadata and controls

54 lines (33 loc) · 3.11 KB

Events

This bundle uses a set of events to allow developers to listen and interact during the whole process.

Documents

Three events are dispatched during the document lifecycle:

Pre action events

  • PreDocumentCreationEvent: Allow to retrieve the index and the document before the creation.
  • PreDocumentDeletionEvent: Allow to retrieve the document and the index before removing the document, by default, the document is fetched before being deleted. This event is not triggered when a set of documents is deleted.
  • PreDocumentRetrievedEvent: Allow to retrieve the document identifier and the index before fetching it.
  • PreDocumentUpdateEvent: Allow to retrieve the document before the update.

Post action events

Indexes

Three events are dispatched during the index lifecycle:

Searches

Two events are dispatched during the search lifecycle:

  • PreSearchEvent: Allow to retrieve the configuration used to trigger a search.
  • PostSearchEvent: Allow to retrieve the Search instance which contain the result of the search.

Synonyms

Four events are dispatched during synonyms lifecyle:

Update events

Reset events

Note

Each event is listened and trigger an info() log when dispatched.