# Caching of filters, merging of indices

**URL:** <https://discuss.elastic.co/t/caching-of-filters-merging-of-indices/4520>\
**Category:** Elasticsearch\
**Created:** [June 1, 2011, 4:23pm UTC](https://discuss.elastic.co/t/caching-of-filters-merging-of-indices/4520 "2011-06-01T16:23:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michel\_Conrad](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michel\_Conrad](https://discuss.elastic.co/u/Michel_Conrad)\
**Post date:** [June 1, 2011, 4:23pm UTC](https://discuss.elastic.co/t/caching-of-filters-merging-of-indices/4520/1 "2011-06-01T16:23:21Z")

</div>

Hi,  
I want users to have the possibility to define filters on the  
searchindex and to only search in this domain, what would be the best  
approach to realize this?

The different filters can be very long and over many terms, in a way  
that it would be impratical to rely on filtering at querytime.  
The problem that comes to mind when defining flags at indexing time,  
is the inability to change a filter without reindexing.

Is it possible to define filters or secondary indices in elasticsearch  
that will automatically be cached, in a way that:

- When a user changes a filter, the cache will be updated.
- When new documents are indexed, the cache will be updated. (could I  
use a percolator for this?)
- Would it be possible to periodically update the index without  
reindexing, updating the flags for the filters. (Could I use a river  
for this?)

Another thing I wondering about, is it possible to merge different indices?

Thanks,  
Michel

---

<div class="post-metadata">

**Author:** ![Karussell1](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Karussell1](https://discuss.elastic.co/u/Karussell1)\
**Post date:** [June 1, 2011, 9:11pm UTC](https://discuss.elastic.co/t/caching-of-filters-merging-of-indices/4520/2 "2011-06-01T21:11:20Z")

</div>

How many terms? Only hundreds? Did you tried it?

> is it possible to merge different indices?

you can use the \_scan search + feeding to merge two indices

On Jun 1, 6:23 pm, Michel Conrad [michel.con...@trendiction.com](mailto:michel.con...@trendiction.com)  
wrote:

> Hi,  
> I want users to have the possibility to define filters on the  
> searchindex and to only search in this domain, what would be the best  
> approach to realize this?
> 
> The different filters can be very long and over many terms, in a way  
> that it would be impratical to rely on filtering at querytime.  
> The problem that comes to mind when defining flags at indexing time,  
> is the inability to change a filter without reindexing.
> 
> Is it possible to define filters or secondary indices in elasticsearch  
> that will automatically be cached, in a way that:
> 
> - When a user changes a filter, the cache will be updated.
> - When new documents are indexed, the cache will be updated. (could I  
> use a percolator for this?)
> - Would it be possible to periodically update the index without  
> reindexing, updating the flags for the filters. (Could I use a river  
> for this?)
> 
> Another thing I wondering about, is it possible to merge different indices?
> 
> Thanks,  
> Michel

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [June 2, 2011, 7:33am UTC](https://discuss.elastic.co/t/caching-of-filters-merging-of-indices/4520/3 "2011-06-02T07:33:38Z")

</div>

If you want to create "auxiliary" indices, then you will need to manage them yourself. Either periodically reindex into them, or update them on the fly, but, the logic will need to be in your app. A plugin will not have special features compared to something running on "your end".

There isn't an option to merge two indices... .

On Wednesday, June 1, 2011 at 7:23 PM, Michel Conrad wrote:

> Hi,  
> I want users to have the possibility to define filters on the  
> searchindex and to only search in this domain, what would be the best  
> approach to realize this?
> 
> The different filters can be very long and over many terms, in a way  
> that it would be impratical to rely on filtering at querytime.  
> The problem that comes to mind when defining flags at indexing time,  
> is the inability to change a filter without reindexing.
> 
> Is it possible to define filters or secondary indices in elasticsearch  
> that will automatically be cached, in a way that:
> 
> - When a user changes a filter, the cache will be updated.
> - When new documents are indexed, the cache will be updated. (could I  
> use a percolator for this?)
> - Would it be possible to periodically update the index without  
> reindexing, updating the flags for the filters. (Could I use a river  
> for this?)
> 
> Another thing I wondering about, is it possible to merge different indices?
> 
> Thanks,  
> Michel

---

<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:** [July 6, 2017, 4:04am UTC](https://discuss.elastic.co/t/caching-of-filters-merging-of-indices/4520/4 "2017-07-06T04:04:56Z")

</div>


