Have a look at using Solr's faceting to give you counts back on
specific fields. Details here:
<http://wiki.apache.org/solr/SimpleFacetParameters>
On Aug 20, 2007, at 12:35 PM, Jeffrey Tiong wrote:
Hi,
I am trying to do some counting on certain fields of the search
results,
currently I am using PHP to do the counting, but it is impossible
to do this
when the results sets reach a few hundred thousands. Does anyone
here has
any idea on how to do this?
Example of scenario,
1. The solr schema index fields such as <product name>,
<manufacturer
name> and <product code>
2. User inputs certain query, there are 100,000 results returned
3. Out from that 100,000 results, we want to show the users what
are
the top 5 most frequent <product name>, <manufacturer name> and
<product
code>
4. for example, when users search for hard drive, we show the users
top 5 manufacturer names are seagate, samsung, ibm etc
Thanks a lot!
Regards,
Jeffrey