You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Rubinho <ru...@gekiere.com> on 2011/10/31 08:27:13 UTC

Facet count in grouped results

Hi,

I'm working on a travelwebsite and want create the whole search with Solr.

I added grouping on the query, because i want to show a group of trips with
the same ID (roundtripgroupcode) only once.
A trip has multiple departure days, and i just want to show 1 trip, while in
de detail screen, i'll show all available departure dates.

So, a table has following fields:
RoundtripgroupCode, CountryCode, DepartureDate, and other less important
fields
The real ID of a trip is the field 'RoundtripgroupCode'

When i don't filter by country, i receive all countries with their correct
count. 
When i do a filter by country, the count of my countries isn't grouped
anymore 

When i get the number of trips/month, i just get numbers for the next 2
months and no numbers for the other months (the trip should appear here each
time in a month, because they have departures in each) 

Can you help me please? 

http://localhost:8080/solr/select?facet=true&facet.date={!ex=SD}StartDate&f.StartDate.facet.date.start=2011-10-01T00:00:00Z&f.StartDate.facet.date.end=2012-09-30T00:00:00Z&f.StartDate.facet.date.gap=%2B1MONTH&facet.field={!ex=CC}CountryCode&rows=0&version=2.2&q=*:*&group=true&group.field=RoundtripgroupCode&group.truncate=true 

These parts of the query are added when a selection is made: 
&fq={!tag=CC}CountryCode:CR 
&fq={!tag=SD}StartDate:[2011-10-01T00:00:00Z TO 2011-10-31T00:00:00Z] 

--
View this message in context: http://lucene.472066.n3.nabble.com/Facet-count-in-grouped-results-tp3467224p3467224.html
Sent from the Solr - User mailing list archive at Nabble.com.