# Need help working with facets using tire gem in Ruby on Rails for elasticsearch

**URL:** <https://discuss.elastic.co/t/need-help-working-with-facets-using-tire-gem-in-ruby-on-rails-for-elasticsearch/17644>\
**Category:** Elasticsearch\
**Created:** [May 21, 2014, 2:08pm UTC](https://discuss.elastic.co/t/need-help-working-with-facets-using-tire-gem-in-ruby-on-rails-for-elasticsearch/17644 "2014-05-21T14:08:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![saivadavalli](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@saivadavalli](https://discuss.elastic.co/u/saivadavalli)\
**Post date:** [May 21, 2014, 2:08pm UTC](https://discuss.elastic.co/t/need-help-working-with-facets-using-tire-gem-in-ruby-on-rails-for-elasticsearch/17644/1 "2014-05-21T14:08:54Z")

</div>

I am newbie trying to implement elasticsearch in my web application. I have a page with a list of about 100 universities and their details. I would like to implement facet search on the list based on the state where university belongs.

I created a state\_id column in the univ table and indexed the states. However, I was only able to index 7 unique state\_ids when I try to include the 8th it gets assigned to any of the existing 7 ids.

Any help is appreicated.

Thankyou

---

<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:27am UTC](https://discuss.elastic.co/t/need-help-working-with-facets-using-tire-gem-in-ruby-on-rails-for-elasticsearch/17644/2 "2017-07-06T01:27:51Z")

</div>

Closed on July 6, 2017, 1:27am UTC


