# First production schema issues - ES beginner

**URL:** <https://discuss.elastic.co/t/first-production-schema-issues-es-beginner/21861>\
**Category:** Elasticsearch\
**Created:** [January 27, 2015, 11:59pm UTC](https://discuss.elastic.co/t/first-production-schema-issues-es-beginner/21861 "2015-01-27T23:59:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandru\_Emil\_Lupu](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@Alexandru\_Emil\_Lupu](https://discuss.elastic.co/u/Alexandru_Emil_Lupu)\
**Post date:** [January 27, 2015, 11:59pm UTC](https://discuss.elastic.co/t/first-production-schema-issues-es-beginner/21861/1 "2015-01-27T23:59:58Z")

</div>

Hello!

I am trying to create an elasticsearch index in order to achieve my goals.  
The main problem of the task is it's complexity, and after 3 days of tries,  
retries etc, i am turning to this group for suggestions:

I want to create a statistics page that would allow me to do following  
things:

As a forum owner, i would like to search and filter (only) my users, based  
on their activity or their status regarding the forum application, and of  
course i should be able to see some data aggregation (activity within 30  
days, 7 days ) etc.

My database structure looks like :

> <https://gist.github.com/alecslupu/168c0f62f948d633378b>

I have tried to create the index the user model, but for some reason, it  
get's fuzzy when it comes to filter the results, as i would always need to  
filter based on a forum id, and if needed to orfder by the nested status in  
the user\_forums association.

I have thought to create it on user\_forum model, but i would end up, with  
having multiple duplicates for user record.

Any ideea on how could i structure that, given the fact that all the infos  
might become a facet?

Thanks in advance  
Alex

--  
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/42108a22-734c-4601-af45-a1a0745c07ff%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/42108a22-734c-4601-af45-a1a0745c07ff%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:36am UTC](https://discuss.elastic.co/t/first-production-schema-issues-es-beginner/21861/2 "2017-07-06T00:36:17Z")

</div>

Closed on July 6, 2017, 12:36am UTC


