# Multiple facets error

**URL:** <https://discuss.elastic.co/t/multiple-facets-error/11693>\
**Category:** Elasticsearch\
**Created:** [April 25, 2013, 12:15pm UTC](https://discuss.elastic.co/t/multiple-facets-error/11693 "2013-04-25T12:15:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adam\_Lebsack](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adam_lebsack/32/2369_2.png) [@Adam\_Lebsack](https://discuss.elastic.co/u/Adam_Lebsack)\
**Post date:** [April 25, 2013, 12:15pm UTC](https://discuss.elastic.co/t/multiple-facets-error/11693/1 "2013-04-25T12:15:34Z")

</div>

I'm trying to query with multiple facets in a query. I've posted the query  
and subsequent error  
here: [https://gist.github.com/alebsack/fc8f0b377c1ca1e780fd](https://gist.github.com/alebsack/fc8f0b377c1ca1e780fd)

The query works if I remove one of the facets. Is the format correct? Is  
it possible to use more than one facet? I'm using tire to form the query,  
and it seems to be creating the query correctly per the documentation. Is  
this a bug, or am I in fact doing something wrong?

ES version: 0.20.6  
OS: OS X Lion 10.8.3

Regards,  
Adam

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Yehuda\_Zargarov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yehuda_zargarov/32/2164_2.png) [@Yehuda\_Zargarov](https://discuss.elastic.co/u/Yehuda_Zargarov)\
**Post date:** [April 25, 2013, 12:38pm UTC](https://discuss.elastic.co/t/multiple-facets-error/11693/2 "2013-04-25T12:38:55Z")

</div>

There is no problem creating as much facets as you want.

Try removing the second facet called 'inactive\_2w' (on which you get the  
error) and see if you still get the same error..

BTW why do you have an 'and' filter in the query section when you only have  
1 condition?

On Thursday, April 25, 2013 3:15:34 PM UTC+3, Adam Lebsack wrote:

> I'm trying to query with multiple facets in a query. I've posted the  
> query and subsequent error here:  
> [Multiple facets error · GitHub](https://gist.github.com/alebsack/fc8f0b377c1ca1e780fd)
> 
> The query works if I remove one of the facets. Is the format correct? Is  
> it possible to use more than one facet? I'm using tire to form the query,  
> and it seems to be creating the query correctly per the documentation. Is  
> this a bug, or am I in fact doing something wrong?
> 
> ES version: 0.20.6  
> OS: OS X Lion 10.8.3
> 
> Regards,  
> Adam

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Adam\_Lebsack](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adam_lebsack/32/2369_2.png) [@Adam\_Lebsack](https://discuss.elastic.co/u/Adam_Lebsack)\
**Post date:** [April 25, 2013, 12:50pm UTC](https://discuss.elastic.co/t/multiple-facets-error/11693/3 "2013-04-25T12:50:52Z")

</div>

Like I mentioned, the query works properly if I remove one of the facets,  
so I've tried removing the 'inactive\_2w' already.

As for the query, the "and" is put there by tire when I do:

```
  query do
    filtered do
      query { all }
      filter :term, :customer_id => customer_id
    end
  end

```

... but I _think_ that should be unrelated, right?

On Thursday, April 25, 2013 1:38:55 PM UTC+1, Yehuda Zargarov wrote:

> There is no problem creating as much facets as you want.
> 
> Try removing the second facet called 'inactive\_2w' (on which you get the  
> error) and see if you still get the same error..
> 
> BTW why do you have an 'and' filter in the query section when you only  
> have 1 condition?
> 
> On Thursday, April 25, 2013 3:15:34 PM UTC+3, Adam Lebsack wrote:
> 
> > I'm trying to query with multiple facets in a query. I've posted the  
> > query and subsequent error here:  
> > [Multiple facets error · GitHub](https://gist.github.com/alebsack/fc8f0b377c1ca1e780fd)
> > 
> > The query works if I remove one of the facets. Is the format correct?  
> > Is it possible to use more than one facet? I'm using tire to form the  
> > query, and it seems to be creating the query correctly per the  
> > documentation. Is this a bug, or am I in fact doing something wrong?
> > 
> > ES version: 0.20.6  
> > OS: OS X Lion 10.8.3
> > 
> > Regards,  
> > Adam

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Yehuda\_Zargarov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yehuda_zargarov/32/2164_2.png) [@Yehuda\_Zargarov](https://discuss.elastic.co/u/Yehuda_Zargarov)\
**Post date:** [April 25, 2013, 1:07pm UTC](https://discuss.elastic.co/t/multiple-facets-error/11693/4 "2013-04-25T13:07:44Z")

</div>

It is obviously not the reason for the error.. just didn't make sense to me.

Did you try removing the first facet and leaving only the "inactive\_2w"?

On Thursday, April 25, 2013 3:50:52 PM UTC+3, Adam Lebsack wrote:

> Like I mentioned, the query works properly if I remove one of the facets,  
> so I've tried removing the 'inactive\_2w' already.
> 
> As for the query, the "and" is put there by tire when I do:
> 
> ```
> query do
> filtered do
> query { all }
> filter :term, :customer_id => customer_id
> end
> end
> 
> ```
> 
> ... but I _think_ that should be unrelated, right?
> 
> On Thursday, April 25, 2013 1:38:55 PM UTC+1, Yehuda Zargarov wrote:
> 
> > There is no problem creating as much facets as you want.
> > 
> > Try removing the second facet called 'inactive\_2w' (on which you get the  
> > error) and see if you still get the same error..
> > 
> > BTW why do you have an 'and' filter in the query section when you only  
> > have 1 condition?
> > 
> > On Thursday, April 25, 2013 3:15:34 PM UTC+3, Adam Lebsack wrote:
> > 
> > > I'm trying to query with multiple facets in a query. I've posted the  
> > > query and subsequent error here:  
> > > [Multiple facets error · GitHub](https://gist.github.com/alebsack/fc8f0b377c1ca1e780fd)
> > > 
> > > The query works if I remove one of the facets. Is the format correct?  
> > > Is it possible to use more than one facet? I'm using tire to form the  
> > > query, and it seems to be creating the query correctly per the  
> > > documentation. Is this a bug, or am I in fact doing something wrong?
> > > 
> > > ES version: 0.20.6  
> > > OS: OS X Lion 10.8.3
> > > 
> > > Regards,  
> > > Adam

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Adam\_Lebsack](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adam_lebsack/32/2369_2.png) [@Adam\_Lebsack](https://discuss.elastic.co/u/Adam_Lebsack)\
**Post date:** [April 25, 2013, 1:19pm UTC](https://discuss.elastic.co/t/multiple-facets-error/11693/5 "2013-04-25T13:19:25Z")

</div>

Yes, I've tried both... each facet works on its own. The interesting part  
of the error is at the bottom:

Parse Failure [No parser for element [inactive\_2w]]

Why would an (almost) identical sibling of inactive\_1w not have a parser  
defined?

On Thursday, April 25, 2013 2:07:44 PM UTC+1, Yehuda Zargarov wrote:

> It is obviously not the reason for the error.. just didn't make sense to  
> me.
> 
> Did you try removing the first facet and leaving only the "inactive\_2w"?
> 
> On Thursday, April 25, 2013 3:50:52 PM UTC+3, Adam Lebsack wrote:
> 
> > Like I mentioned, the query works properly if I remove one of the facets,  
> > so I've tried removing the 'inactive\_2w' already.
> > 
> > As for the query, the "and" is put there by tire when I do:
> > 
> > ```
> > query do
> > filtered do
> > query { all }
> > filter :term, :customer_id => customer_id
> > end
> > end
> > 
> > ```
> > 
> > ... but I _think_ that should be unrelated, right?
> > 
> > On Thursday, April 25, 2013 1:38:55 PM UTC+1, Yehuda Zargarov wrote:
> > 
> > > There is no problem creating as much facets as you want.
> > > 
> > > Try removing the second facet called 'inactive\_2w' (on which you get  
> > > the error) and see if you still get the same error..
> > > 
> > > BTW why do you have an 'and' filter in the query section when you only  
> > > have 1 condition?
> > > 
> > > On Thursday, April 25, 2013 3:15:34 PM UTC+3, Adam Lebsack wrote:
> > > 
> > > > I'm trying to query with multiple facets in a query. I've posted the  
> > > > query and subsequent error here:  
> > > > [Multiple facets error · GitHub](https://gist.github.com/alebsack/fc8f0b377c1ca1e780fd)
> > > > 
> > > > The query works if I remove one of the facets. Is the format correct?  
> > > > Is it possible to use more than one facet? I'm using tire to form the  
> > > > query, and it seems to be creating the query correctly per the  
> > > > documentation. Is this a bug, or am I in fact doing something wrong?
> > > > 
> > > > ES version: 0.20.6  
> > > > OS: OS X Lion 10.8.3
> > > > 
> > > > Regards,  
> > > > Adam

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Yehuda\_Zargarov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yehuda_zargarov/32/2164_2.png) [@Yehuda\_Zargarov](https://discuss.elastic.co/u/Yehuda_Zargarov)\
**Post date:** [April 25, 2013, 1:22pm UTC](https://discuss.elastic.co/t/multiple-facets-error/11693/6 "2013-04-25T13:22:17Z")

</div>

can you please pass your full \*tire \*code?

On Thursday, April 25, 2013 4:19:25 PM UTC+3, Adam Lebsack wrote:

> Yes, I've tried both... each facet works on its own. The interesting  
> part of the error is at the bottom:
> 
> Parse Failure [No parser for element [inactive\_2w]]
> 
> Why would an (almost) identical sibling of inactive\_1w not have a parser  
> defined?
> 
> On Thursday, April 25, 2013 2:07:44 PM UTC+1, Yehuda Zargarov wrote:
> 
> > It is obviously not the reason for the error.. just didn't make sense to  
> > me.
> > 
> > Did you try removing the first facet and leaving only the "inactive\_2w"?
> > 
> > On Thursday, April 25, 2013 3:50:52 PM UTC+3, Adam Lebsack wrote:
> > 
> > > Like I mentioned, the query works properly if I remove one of the  
> > > facets, so I've tried removing the 'inactive\_2w' already.
> > > 
> > > As for the query, the "and" is put there by tire when I do:
> > > 
> > > ```
> > > query do
> > > filtered do
> > > query { all }
> > > filter :term, :customer_id => customer_id
> > > end
> > > end
> > > 
> > > ```
> > > 
> > > ... but I _think_ that should be unrelated, right?
> > > 
> > > On Thursday, April 25, 2013 1:38:55 PM UTC+1, Yehuda Zargarov wrote:
> > > 
> > > > There is no problem creating as much facets as you want.
> > > > 
> > > > Try removing the second facet called 'inactive\_2w' (on which you get  
> > > > the error) and see if you still get the same error..
> > > > 
> > > > BTW why do you have an 'and' filter in the query section when you only  
> > > > have 1 condition?
> > > > 
> > > > On Thursday, April 25, 2013 3:15:34 PM UTC+3, Adam Lebsack wrote:
> > > > 
> > > > > I'm trying to query with multiple facets in a query. I've posted the  
> > > > > query and subsequent error here:  
> > > > > [Multiple facets error · GitHub](https://gist.github.com/alebsack/fc8f0b377c1ca1e780fd)
> > > > > 
> > > > > The query works if I remove one of the facets. Is the format correct?  
> > > > > Is it possible to use more than one facet? I'm using tire to form the  
> > > > > query, and it seems to be creating the query correctly per the  
> > > > > documentation. Is this a bug, or am I in fact doing something wrong?
> > > > > 
> > > > > ES version: 0.20.6  
> > > > > OS: OS X Lion 10.8.3
> > > > > 
> > > > > Regards,  
> > > > > Adam

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Adam\_Lebsack](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adam_lebsack/32/2369_2.png) [@Adam\_Lebsack](https://discuss.elastic.co/u/Adam_Lebsack)\
**Post date:** [April 25, 2013, 1:24pm UTC](https://discuss.elastic.co/t/multiple-facets-error/11693/7 "2013-04-25T13:24:44Z")

</div>

> <https://gist.github.com/alebsack/fc8f0b377c1ca1e780fd#file-tire-query>

On Thursday, April 25, 2013 2:22:17 PM UTC+1, Yehuda Zargarov wrote:

> can you please pass your full \*tire \*code?
> 
> On Thursday, April 25, 2013 4:19:25 PM UTC+3, Adam Lebsack wrote:
> 
> > Yes, I've tried both... each facet works on its own. The interesting  
> > part of the error is at the bottom:
> > 
> > Parse Failure [No parser for element [inactive\_2w]]
> > 
> > Why would an (almost) identical sibling of inactive\_1w not have a parser  
> > defined?
> > 
> > On Thursday, April 25, 2013 2:07:44 PM UTC+1, Yehuda Zargarov wrote:
> > 
> > > It is obviously not the reason for the error.. just didn't make sense to  
> > > me.
> > > 
> > > Did you try removing the first facet and leaving only the "inactive\_2w"?
> > > 
> > > On Thursday, April 25, 2013 3:50:52 PM UTC+3, Adam Lebsack wrote:
> > > 
> > > > Like I mentioned, the query works properly if I remove one of the  
> > > > facets, so I've tried removing the 'inactive\_2w' already.
> > > > 
> > > > As for the query, the "and" is put there by tire when I do:
> > > > 
> > > > ```
> > > > query do
> > > > filtered do
> > > > query { all }
> > > > filter :term, :customer_id => customer_id
> > > > end
> > > > end
> > > > 
> > > > ```
> > > > 
> > > > ... but I _think_ that should be unrelated, right?
> > > > 
> > > > On Thursday, April 25, 2013 1:38:55 PM UTC+1, Yehuda Zargarov wrote:
> > > > 
> > > > > There is no problem creating as much facets as you want.
> > > > > 
> > > > > Try removing the second facet called 'inactive\_2w' (on which you get  
> > > > > the error) and see if you still get the same error..
> > > > > 
> > > > > BTW why do you have an 'and' filter in the query section when you only  
> > > > > have 1 condition?
> > > > > 
> > > > > On Thursday, April 25, 2013 3:15:34 PM UTC+3, Adam Lebsack wrote:
> > > > > 
> > > > > > I'm trying to query with multiple facets in a query. I've posted the  
> > > > > > query and subsequent error here:  
> > > > > > [Multiple facets error · GitHub](https://gist.github.com/alebsack/fc8f0b377c1ca1e780fd)
> > > > > > 
> > > > > > The query works if I remove one of the facets. Is the format  
> > > > > > correct? Is it possible to use more than one facet? I'm using tire to  
> > > > > > form the query, and it seems to be creating the query correctly per the  
> > > > > > documentation. Is this a bug, or am I in fact doing something wrong?
> > > > > > 
> > > > > > ES version: 0.20.6  
> > > > > > OS: OS X Lion 10.8.3
> > > > > > 
> > > > > > Regards,  
> > > > > > Adam

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Yehuda\_Zargarov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yehuda_zargarov/32/2164_2.png) [@Yehuda\_Zargarov](https://discuss.elastic.co/u/Yehuda_Zargarov)\
**Post date:** [April 25, 2013, 1:36pm UTC](https://discuss.elastic.co/t/multiple-facets-error/11693/8 "2013-04-25T13:36:24Z")

</div>

I found an (exactly) similar problem on stack overflow.. there is even a  
reply from karmi (the author of tire) in which he says he has no idea..  
The funny thing is that he also has 2 facets, both with range, and it also  
works when he removes 1 of the facets..

> <https://stackoverflow.com/questions/13778705/elasticsearch-tire-with-rails-no-parser-for-element>

On Thursday, April 25, 2013 4:24:44 PM UTC+3, Adam Lebsack wrote:

> [Multiple facets error · GitHub](https://gist.github.com/alebsack/fc8f0b377c1ca1e780fd#file-tire-query)
> 
> On Thursday, April 25, 2013 2:22:17 PM UTC+1, Yehuda Zargarov wrote:
> 
> > can you please pass your full \*tire \*code?
> > 
> > On Thursday, April 25, 2013 4:19:25 PM UTC+3, Adam Lebsack wrote:
> > 
> > > Yes, I've tried both... each facet works on its own. The interesting  
> > > part of the error is at the bottom:
> > > 
> > > Parse Failure [No parser for element [inactive\_2w]]
> > > 
> > > Why would an (almost) identical sibling of inactive\_1w not have a parser  
> > > defined?
> > > 
> > > On Thursday, April 25, 2013 2:07:44 PM UTC+1, Yehuda Zargarov wrote:
> > > 
> > > > It is obviously not the reason for the error.. just didn't make sense  
> > > > to me.
> > > > 
> > > > Did you try removing the first facet and leaving only the  
> > > > "inactive\_2w"?
> > > > 
> > > > On Thursday, April 25, 2013 3:50:52 PM UTC+3, Adam Lebsack wrote:
> > > > 
> > > > > Like I mentioned, the query works properly if I remove one of the  
> > > > > facets, so I've tried removing the 'inactive\_2w' already.
> > > > > 
> > > > > As for the query, the "and" is put there by tire when I do:
> > > > > 
> > > > > ```
> > > > > query do
> > > > > filtered do
> > > > > query { all }
> > > > > filter :term, :customer_id => customer_id
> > > > > end
> > > > > end
> > > > > 
> > > > > ```
> > > > > 
> > > > > ... but I _think_ that should be unrelated, right?
> > > > > 
> > > > > On Thursday, April 25, 2013 1:38:55 PM UTC+1, Yehuda Zargarov wrote:
> > > > > 
> > > > > > There is no problem creating as much facets as you want.
> > > > > > 
> > > > > > Try removing the second facet called 'inactive\_2w' (on which you get  
> > > > > > the error) and see if you still get the same error..
> > > > > > 
> > > > > > BTW why do you have an 'and' filter in the query section when you  
> > > > > > only have 1 condition?
> > > > > > 
> > > > > > On Thursday, April 25, 2013 3:15:34 PM UTC+3, Adam Lebsack wrote:
> > > > > > 
> > > > > > > I'm trying to query with multiple facets in a query. I've posted  
> > > > > > > the query and subsequent error here:  
> > > > > > > [Multiple facets error · GitHub](https://gist.github.com/alebsack/fc8f0b377c1ca1e780fd)
> > > > > > > 
> > > > > > > The query works if I remove one of the facets. Is the format  
> > > > > > > correct? Is it possible to use more than one facet? I'm using tire to  
> > > > > > > form the query, and it seems to be creating the query correctly per the  
> > > > > > > documentation. Is this a bug, or am I in fact doing something wrong?
> > > > > > > 
> > > > > > > ES version: 0.20.6  
> > > > > > > OS: OS X Lion 10.8.3
> > > > > > > 
> > > > > > > Regards,  
> > > > > > > Adam

--  
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).  
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, 2:39am UTC](https://discuss.elastic.co/t/multiple-facets-error/11693/9 "2017-07-06T02:39:38Z")

</div>


