# Need advice for search with list ids

**URL:** https://discuss.elastic.co/t/need-advice-for-search-with-list-ids/5498
**Category:** Elasticsearch
**Created:** [October 2, 2011, 2:47pm UTC](https://discuss.elastic.co/t/need-advice-for-search-with-list-ids/5498 "2011-10-02T14:47:50Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![alsab](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@alsab](https://discuss.elastic.co/u/alsab)
#### Post date: [October 2, 2011, 2:47pm UTC](https://discuss.elastic.co/t/need-advice-for-search-with-list-ids/5498/1 "2011-10-02T14:47:50Z")

</div>

Hello,

For my project I have an index with 1.000.000 documents.  
Each people could add document to their favorites.

Now if somebody want to make a search in their favorites with facets,  
there is 2 solutions:

- I create an index for favorites.  
I get all favorites ids for the user.  
And I make a query with "terms" for find all documents.

I made a test on my laptop for 10.000 favorites / 7sec. Maybe it's  
faster on a server? Because 7 sec it's not possible.

Or second solution:

- I create a child index for favorites.  
And I made a query with has\_child or top\_children for find all  
documents.  
But is it a good solution if the index become very large with the  
time?

Somebody could advise me? thanks.

Another question: 90% percent of my data need to be indexed. So I  
would like to know if it's possible to use only ES for stock all my  
data, and is it SURE? thanks

---

<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, 3:53am UTC](https://discuss.elastic.co/t/need-advice-for-search-with-list-ids/5498/2 "2017-07-06T03:53:05Z")

</div>


