# Automate Reindex API while source is still indexing

**URL:** <https://discuss.elastic.co/t/automate-reindex-api-while-source-is-still-indexing/195099>\
**Category:** Elasticsearch\
**Created:** [August 13, 2019, 8:27pm UTC](https://discuss.elastic.co/t/automate-reindex-api-while-source-is-still-indexing/195099 "2019-08-13T20:27:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![abaullosa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abaullosa/32/52274_2.png) [@abaullosa](https://discuss.elastic.co/u/abaullosa)\
**Post date:** [August 13, 2019, 8:27pm UTC](https://discuss.elastic.co/t/automate-reindex-api-while-source-is-still-indexing/195099/1 "2019-08-13T20:27:03Z")

</div>

Hi.

Im using ES 7. And I need to automate a process on Kibana so when I create a new Index, I need to \_reindex it using a query. Im able to do this manually but, How do I automate this process so everytime I have a new Index then it start reindexing in parallel base on my query?.

Thanks a lot in advance

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [August 14, 2019, 7:40am UTC](https://discuss.elastic.co/t/automate-reindex-api-while-source-is-still-indexing/195099/2 "2019-08-14T07:40:14Z")

</div>

there is no such mechanism, that is doing this automatically. The only thing that comes near this is [Cross Cluster Replication](https://www.elastic.co/guide/en/elasticsearch/reference/7.3/ccr-apis.html)

can you tell more about your use-case?

---

<div class="post-metadata">

**Author:** ![abaullosa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abaullosa/32/52274_2.png) [@abaullosa](https://discuss.elastic.co/u/abaullosa)\
**Post date:** [August 14, 2019, 12:52pm UTC](https://discuss.elastic.co/t/automate-reindex-api-while-source-is-still-indexing/195099/3 "2019-08-14T12:52:30Z")

</div>

Hi!.

Thanks for your reply.

This is what I need to achieve.  
I have a timeserie index that on its documents it has a field called "providers", I need to give access to only 'provider1' . example:  
index: 'myindex'  
providers: 'provider2', 'provider1', 'provider3'.

I will need a kibana space that can only see doccumetns that contain "Provider1"

I know I can limit the user roles to an index, thats why I was thinking on doing some kind of reindex or something that I can create a new index base on a query with this filter.

please let me know if its possible to achive this?.

Thanks a lot in advance

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [August 15, 2019, 7:06am UTC](https://discuss.elastic.co/t/automate-reindex-api-while-source-is-still-indexing/195099/4 "2019-08-15T07:06:33Z")

</div>

how about [document level security](https://www.elastic.co/guide/en/elastic-stack-overview/7.3/document-level-security.html) or [filtered aliases](https://www.elastic.co/guide/en/elasticsearch/reference/7.3/indices-aliases.html#filtered) (which is not real security as the user could specify other indices if he can manipulate the query)

---

<div class="post-metadata">

**Author:** ![abaullosa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abaullosa/32/52274_2.png) [@abaullosa](https://discuss.elastic.co/u/abaullosa)\
**Post date:** [August 21, 2019, 12:30pm UTC](https://discuss.elastic.co/t/automate-reindex-api-while-source-is-still-indexing/195099/5 "2019-08-21T12:30:28Z")

</div>

Thanks a lot spinscale.

The doc level security works perfectly for me!. thanks for the help!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 18, 2019, 12:30pm UTC](https://discuss.elastic.co/t/automate-reindex-api-while-source-is-still-indexing/195099/6 "2019-09-18T12:30:48Z")

</div>

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