Can I query Elasticsearch when updating index is in progress?


(Thusfar7) #1

So I'm thinking about creating a classifieds site with Nodejs + Mongoosastic. I suppose you know that mongoosastic is mongoose plugin that updates indexes when db update (cud) happens with mongoose (mongodb).

My question is when a new ad is created (or deleted or updated) in mongodb, elasticsearch index will be updated. In that time, during index update, will I be able to fetch ads from elasticsearch??


(Mark Harwood) #2

Yes.
Searches operate on a set of index files ("segments") that represent a point in time. New or changed content goes into new files which are unrelated to any active searches on older files. Periodically (by default every second) the completed new files are added to the set of files that are used for searching.

More background here from the 2.x version of elasticsearch : https://www.elastic.co/guide/en/elasticsearch/guide/current/near-real-time.html


(system) #3

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