Search code examples
javascriptelasticsearchcurlelasticsearch-pyelasticsearch-dsl-py

Is it possible, in Elasticsearch, to do a temporary POST to an index?


I would like to know if I can temporarily save a document to an index, and when I want to actually fully publish/POST this document, can I take the "temporary"/"dry-run" flag away from the document?


Solution

  • There is no out the box way do it but this is how I would do it :

    1. You can create a new index , to store the temporary documents.
    2. Create an alias that covers both the temp index and the existing index, this will allow you to test your query locally.

    3. when you are ready to "Release" the document copy it the "Real" index, and if it's many document use the reindex API from the temp index to the "real" one.