# Cross Index Filters

**URL:** <https://discuss.elastic.co/t/cross-index-filters/3034>\
**Category:** Elasticsearch\
**Created:** [June 22, 2010, 11:21am UTC](https://discuss.elastic.co/t/cross-index-filters/3034 "2010-06-22T11:21:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jan\_Fiedler](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jan_fiedler/32/2518_2.png) [@Jan\_Fiedler](https://discuss.elastic.co/u/Jan_Fiedler)\
**Post date:** [June 22, 2010, 11:21am UTC](https://discuss.elastic.co/t/cross-index-filters/3034/1 "2010-06-22T11:21:06Z")

</div>

A common requirement for searches in web shops is to filter products  
based on some 'other' criteria that is not directly bound to the  
product data life cycle. Examples for such 'other' data is stock level  
information (most prominently) but also product ratings or prices. The  
important thing here is that the update frequency (and source) for  
this 'other' data is completely separated from the actual product  
data.

I know that I could index this 'other' data along with the product  
data to have it available for filtering. However, this would cause a  
constant reindexing of unchanged data (the product data) with most  
likely very negative consequences for cache efficiency.

A perfect solution would be to represent the different aspects of the  
product data in different indexes (e.g. product index, availability  
index, price index, rating index) and to be able to query the product  
index with filters into the complementary indexes. Relationships  
between the documents in the different indexes can be maintained by  
the id field (i.e. a single product would have a document in multiple  
indexes keyed by the same SKU).

Has anybody had the same problem and maybe a good solution for this?  
Is this something that would make a useful feature for ES ?

---

<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 22, 2010, 11:37am UTC](https://discuss.elastic.co/t/cross-index-filters/3034/2 "2010-06-22T11:37:09Z")

</div>

This is a very valid requirement, but sadly not easy to implement at all (in  
an efficient manner). This type of "joins" are problematic in Lucene, though  
I have some ideas on how to try and solve it (as efficient as possible). I  
might try and tackle this for later version, certainly not 0.9... .

-shay.banon

On Tue, Jun 22, 2010 at 2:21 PM, Jan Fiedler [fiedler.jan@gmail.com](mailto:fiedler.jan@gmail.com) wrote:

> A common requirement for searches in web shops is to filter products  
> based on some 'other' criteria that is not directly bound to the  
> product data life cycle. Examples for such 'other' data is stock level  
> information (most prominently) but also product ratings or prices. The  
> important thing here is that the update frequency (and source) for  
> this 'other' data is completely separated from the actual product  
> data.
> 
> I know that I could index this 'other' data along with the product  
> data to have it available for filtering. However, this would cause a  
> constant reindexing of unchanged data (the product data) with most  
> likely very negative consequences for cache efficiency.
> 
> A perfect solution would be to represent the different aspects of the  
> product data in different indexes (e.g. product index, availability  
> index, price index, rating index) and to be able to query the product  
> index with filters into the complementary indexes. Relationships  
> between the documents in the different indexes can be maintained by  
> the id field (i.e. a single product would have a document in multiple  
> indexes keyed by the same SKU).
> 
> Has anybody had the same problem and maybe a good solution for this?  
> Is this something that would make a useful feature for ES ?

---

<div class="post-metadata">

**Author:** ![medcl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/medcl/32/3297_2.png) [@medcl](https://discuss.elastic.co/u/medcl)\
**Post date:** [October 20, 2010, 7:54am UTC](https://discuss.elastic.co/t/cross-index-filters/3034/3 "2010-10-20T07:54:26Z")

</div>

hey,kimchy,does this feature available now?

---

<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:17am UTC](https://discuss.elastic.co/t/cross-index-filters/3034/4 "2017-07-06T04:17:46Z")

</div>


