Well, right now, I'm using SOLR in a LOT of my projects.
I'm VERY fond of it, proud of it and VERY happy that such a team exists to
make it work.

Of course the pagination issue is a bit frustrating on the field
collapsing... But... heck... I'm currently de-normalizing my postgresql
database and... I'm just counting the total unique rows using SQL :D

And let SOLR do the rest of the job....

So... As a generic idea for the SOLR JAVA expert-people, I think the
counting of groups per each field should be something to be done at indexing
time rather than at query-time.

So basically when you index each document, you compute the grouping thingie
IF the user would so choose to have his field as eligible for grouping
inside his schema.xml... If you guys geather my meaning...

So I would have a field like this:
<field GROUPING="TRUE" name="unit_id" type="tint" indexed="true"
stored="true" required="true" />

Or something like that... and the indexer will know to compute the number of
groups that exist for this field, so that number would be available at
query-time without too much stress on the memory or CPU.

Hope this helps....

In the meanwhile... just count the total from SQL... And keep your index
in-sync often :D

Cip.

-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/solr-4-0-pagination-tp1812384p2123255.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to