Hmmm, something's not making sense here. First, grouping shouldn't affect faceting as far as I understand, they're two entirely different constructs. Why would you expect specifying grouping to affect facet counts?
Second, what is this all about? fq={!tag=CC}CountryCode:MA& It looks like you're mixing filter query with facet query syntax, maybe this is causing some kind of strange behavior? Because I can't reconcile your statement that if you remove that your facet counts are 1 for both MA and ID. So can you show the complete output with &debugQuery=on for the two results? Best Erick On Thu, Nov 10, 2011 at 8:13 AM, Rubinho <ru...@gekiere.com> wrote: > Hi, > > I have a problem with facets on a grouped field. > > Ex: SolR has 3 records, 2 records with the same RountripgroupCode and > CountryCode ("MA"), and 1 record with another roundtripgroupCode and another > CountryCode ("ID"). > Because i use grouping, i should have only have 1 result in MA and 1 result > in ID. > When executing the query below, i get a facetresult of 2 on the CountryCode > MA (it should be 1) and 1 on ID. > > If i remove the line fq={!tag=CC}CountryCode:MA, then the facetresults are > correct: 1 for each CountryCode. > > How can i solve this, so that i'll have the same result with filter on > Countrycode? > > > http://zrheab21:9090/solr/select? > facet=true& > facet.field={!ex=CC}CountryCode& > facet.field=IsBeach& > fq={!tag=CC}CountryCode:MA& > group=true& > group.truncate=true& > group.field=RoundtripgroupCode& > q=*:* > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Facet-counts-incorrect-on-filtered-field-when-using-groups-tp3496683p3496683.html > Sent from the Solr - User mailing list archive at Nabble.com. >