toptal/chewy — pull request #59 by inbeom (2014-08-26 14:53:26+00:00)
Title: Refer previously indexed documents to updating/deleting child documents

In #58, as @pyromaniac suggested:

> So I'm thinking about in case of parent mapping presence - just get all the reindexed documents from ES with scroll API and compare parent ids with those I'm going to index. If there is no parent_id (in case of deletion by id) then just add it. If parent_id was changed - then split this document-related bulk query part into two stages: delete and then index.

I've added `Chewy::Type::Import::fetch_indexed_objects` which fetches indexed documents having IDs of objects to index (using ids query), and refer the objects when building body for bulk request.

Thanks!