Linked like facet counts

Hi all

I am a bit noob in searching and elastic search. I have successfully
managed to use elastic search in an application using tire(
https://github.com/karmi/tire) but an enhancement relating to count for
facets is bothering me very much. I had googled the issue but couldn't find
relevant clues. The issue is that when I search on a some term (say white
on color) then the facet count is only returning count for white. I want
the counts for other colors also provided with the other conditions that
are there like screen size of laptops etc.. If I use global:true than the
other terms being searched are not taken into account for the count.
Kindly refer to attached images from linkedin.com and
https://gist.github.com/2403416 for my example.

thanks for any assistance that could be done

regards

You can divide your query into query and filter. The query part will
affect both the returned documents and facet counts, while filters will
only affect returned documents. In other words, put terms into the query,
and use filters for colors, screen sizes, etc.

On Tuesday, April 17, 2012 1:12:27 AM UTC-4, smiley wrote:

Hi all

I am a bit noob in searching and Elasticsearch. I have successfully
managed to use Elasticsearch in an application using tire(
GitHub - karmi/retire: A rich Ruby API and DSL for the Elasticsearch search engine) but an enhancement relating to count for
facets is bothering me very much. I had googled the issue but couldn't find
relevant clues. The issue is that when I search on a some term (say white
on color) then the facet count is only returning count for white. I want
the counts for other colors also provided with the other conditions that
are there like screen size of laptops etc.. If I use global:true than
the other terms being searched are not taken into account for the count.
Kindly refer to attached images from linkedin.com and
Facets are only showing local counts, I want to have counts like "linkedin.com" that are local but not include current term (i.e. color here). · GitHub for my example.

thanks for any assistance that could be done

regards