views:

30

answers:

1

While playing with Solr and facets, I wanted to get the count of search hits on title and artist of my music albums. I find that faceting in solr doesn't have a straight forward method to do this since every document in Solr here will have both title and artist and the result expected here is count of search hits on each. Following is an example:

Album #1:

<title>Michael: Music From The Motion Picture</title>
<artist>Various Artists</artist>

Album #2:

<title>Bad</title>
<artist>Michael Jackson</artist>

Album #3:

<title>This is it</title>
<artist>Michael Jackson</artist>

If I search for 'Michael', it should return the facets: Title (1) Artist (2).

Has somebody tried this?

-Ethan

A: 
Pascal Dimassimo
Thanks, this solves my need for now (I am using q=Michael instead of *:*). What do you think will be the hit on the search execution time -- will not it shoot up to thrice of search for Michael?
Ethan Collins