Unfortunately, after some tests listing all the distinct surnames or other fields is too slow and too memory consuming with our current infrastructure. Could someone confirm that if I wanted to add this functionality (just count the total of different facets) what I should do is to subclass the SimpleFacets class and create an extended FacetComponent that returns the size of the term counts list instead of the list itself? I see that the FacetComponent is registered by default. Is it possible to register an extended FacetComponent instead? Or just creating a new one is enough?
Sorry for asking so many questions today. I am new to SOLR and I was very excited until I found that I could not comply with one of our requirements: "counting the distinct surnames for names starting with A*", which is possible with SQL but no with SOLR out of the box... Thanks! Bruno 2009/2/4 Bruno Aranda <brunoara...@gmail.com> > Thanks, I will try that though I am talking in my case about 100,000+ > distinct surnames/towns maximum per query and I just needed the count and > not the whole list. In any case, this brute-force approach is still > something I can try but I wonder how this will behave speed and memory wise > when there are many different concurrent queries and so on... > > Cheers, > > Bruno > > 2009/2/4 Shalin Shekhar Mangar <shalinman...@gmail.com> > >> On Wed, Feb 4, 2009 at 2:53 PM, Bruno Aranda <brunoara...@gmail.com> >> wrote: >> >> >> > Mmh, thanks for your answer but with that I get the count of names >> starting >> > with A*, but I would like to get the count of distinct surnames (or town >> > names, or any other field that is not the name...) for the people with >> name >> > starting with A*. Is that possible? >> > >> >> It is possible. You can use fq=name:A* to filter people whose names start >> with 'A'. Then you can use facet.field=surnames or facet.field=town or >> whatever you want with facet.limit=-1 and count the number of results for >> each facet. It may be slow for the first query but it is cached so >> subsequent queries should be faster (make sure you size filterCache >> appropriately). >> >> -- >> Regards, >> Shalin Shekhar Mangar. >> > >