On Jun 28, 2008, at 3:57 AM, lutan wrote:
if I search a keyword likes 'computer' in a shopping website.
the result may contains.
total:
         (1000) products .
categories:
pc        (500) products .
notebook  (300) products .
server    (200) products .

so how do get each categories 'amount.
I try to search many times on onec user search,
but it is so slow

This is a case where you are probably better off starting with Solr, which supports faceting natively.

The main trick to making this fast is coming up with cached sets of each of the categories and intersecting each of those sets with the main result set and using the cardinality of the intersected sets for the counts. Again, Solr is what I'd recommend as a starting point for you.

        Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to