I want to be able to pass an array of category ids (a parent id with all of
it's children, for example) and return only results that match one of those
categories. I have been trying to get it to work with a term query, but no
luck yet.
Also, as a new user of elasticsearch, I am wondering if I should use a
filter/facet for this...
I want to be able to pass an array of category ids (a parent id with all of it's children, for example) and return only results that match one of those categories. I have been trying to get it to work with a term query, but no luck yet.
Also, as a new user of elasticsearch, I am wondering if I should use a filter/facet for this...
I want to be able to pass an array of category ids (a parent id with all
of it's children, for example) and return only results that match one of
those categories. I have been trying to get it to work with a term query,
but no luck yet.
Also, as a new user of elasticsearch, I am wondering if I should use a
filter/facet for this...
I ended up using a terms query (as opposed to term). I'm still interested in knowing if there would be a benefit to using a filter or facet.
On Friday, August 31, 2012 11:38:49 AM UTC-7, David Pilato wrote:
I think I will use a bool Query with 2 must TermQuery on categories field, one for each value.
Does it help?
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
I want to be able to pass an array of category ids (a parent id with all of it's children, for example) and return only results that match one of those categories. I have been trying to get it to work with a term query, but no luck yet.
Also, as a new user of elasticsearch, I am wondering if I should use a filter/facet for this...
I ended up using a terms query (as opposed to term). I'm still interested in knowing if there would be a benefit to using a filter or facet.
On Friday, August 31, 2012 11:38:49 AM UTC-7, David Pilato wrote:
I think I will use a bool Query with 2 must TermQuery on categories field, one for each value.
Does it help?
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
I want to be able to pass an array of category ids (a parent id with all of it's children, for example) and return only results that match one of those categories. I have been trying to get it to work with a term query, but no luck yet.
Also, as a new user of elasticsearch, I am wondering if I should use a filter/facet for this...
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.