# Cross index filtering

**URL:** <https://discuss.elastic.co/t/cross-index-filtering/15205>\
**Category:** Elasticsearch\
**Created:** [January 11, 2014, 12:55am UTC](https://discuss.elastic.co/t/cross-index-filtering/15205 "2014-01-11T00:55:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh\_Harrison](https://avatars.discourse-cdn.com/v4/letter/j/0ea827/32.png) [@Josh\_Harrison](https://discuss.elastic.co/u/Josh_Harrison)\
**Post date:** [January 11, 2014, 12:55am UTC](https://discuss.elastic.co/t/cross-index-filtering/15205/1 "2014-01-11T00:55:37Z")

</div>

I've got a backlog of usernames. I need to pull data associated with those  
usernames into a separate index.  
I want a query that will let me do a terms facet on user counts in the  
first index, with a facet filter excluding the users that already exist in  
the second. Is there a simple way to do this?  
There could end up being a couple hundred million unique users in the  
secondary index, in theory. For that scale, what's the best way to approach  
the problem?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/7523648d-f12d-400d-b2d7-7cfb3c3f01c4%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7523648d-f12d-400d-b2d7-7cfb3c3f01c4%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 1:57am UTC](https://discuss.elastic.co/t/cross-index-filtering/15205/2 "2017-07-06T01:57:19Z")

</div>


