@island.is/content-search-indexer/typeslibrary to ease implementation (see example below).
doSyncfunction (see example below).
SyncOptionsis passed to the importer service as a parameter to the
doSyncfunction (see Importing data section for details ).
doSyncmust resolve to
nullwhen called (see Importing data section for details ).
postSyncfunction that is called after the importer has executed it's
doSyncfunction (see Post sync section for details).
postSyncfunction is passed the
SyncResponse(see Post sync section for details).
SyncResponse.add. You importer should support three types of imports (SyncOptions.syncType):
SyncResponseif a locale in the search engine is not supported.
postSyncis a function called by the indexer after
doSyncand after all data has been imported into elastic. This function can serve as a cleanup function e.g. to release locks or maintain last sync tokens. To use you export a function called
postSyncfrom your importer, it then gets passed the
postSyncOptionsyou returned from
doSyncas part of
Missing title in one entry, should probably not throw an error and hence stop all importers while
Your importer can't connect to it's data sourceprobably should throw an error and hence stop all importers. The importer is used when populating new versions of the indexes when deploying new versions of our apps hence we don't want the importer to succeed when it shouldn't.