Problem with inconsistently inserted documents using javascript client with etl

I am having trouble with the consistency of indexing data using javascript client
and etl package for node. My code imports data to mongodb or elasticsearch, depending
on a config option.

The following code contains tests for both mongodb and elasticsearch.
While inserting to mongodb (with monk) works perfectly, I don't get consistent
results from elasticsearch javascript client. Most of the time, 2 of the 3 documents
in my CSV will get inserted. But some times it will be 1.

Both the mongo and the elastic option use the same node etl pipeline.

Thanks for your help

In the context of tests, you should call refresh before searching.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.