lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: unique values from a field in a result
Date Tue, 29 Apr 2008 22:39:31 GMT

: My example is just simple, in real life the numbers are a lot bigger. However,
: the amount of unique products vs variations is such that it seems a lot of
: work to iterate over al variations in a DocSet just to get the few unique
: products.
: But, what I understand from you anwser is that the best way to get the 3
: unique products is to iterate over the 1000 variations in the result DocSet?
: And if that is the case I'm happy with it.

in a nutshell: yes.  As ian mentione,d you can use sampling to get 
approximate info, but if you only check 999 of the docs in the DocSet's 
it's always possible that the 1000th "variation" doc actaully refers to a 
4th product.

the other appraoch to take is to have redundent denormalization: index one 
doc per varaition, and one doc per product -- power your left nav with a 
search against the "product" docs, and power the main listing with a 
search against the "variation" docs.


View raw message