Hi, For us this is a usability concern. You either don't show Sweden in a pick-list called Country and some users go away thinking you don't *ever* support Sweden (not true). OR you allow a user to execute an empty result search - but at least they know you do support Sweden.
It is we believe undesirable for a pick-list to change from day to day as the index changes - we have a category pick-list also that acts the same. One day a user could see Productions, the next day nothing. Regular users would see this as odd. We believe that usability dictates we show all possible values and add a zero after to prevent the user executing searches but at least they see the possibilities. The best of both worlds we hope. I have solved this using earlier suggestions of merging a database list query with the Solr facet counts. I like your idea though - good thinking but the way I've done is working great also :) Thanks and best wishes, Allistair On 29 Sep 2010, at 14:08, kenf_nc wrote: > > I don't understand why you would want to show Sweden if it isn't in the > index, what will your UI do if the user selects Sweden? > > However, one way to handle this would be to make a second document type. > Have a field called type or some such, and make the new document type be > 'dummy' or 'system' or something like that. You can put documents in here > with fields for any pick-lists you want to facet on and include all possible > values from your database. > > Do your facets on either just this doc, or all docs, either way should work. > However on your search queries always include fq=-type:system > basically exclude all documents of type system from all your searches. > Messy, but should do what you want. > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Missing-facet-values-for-zero-counts-tp1602276p1603893.html > Sent from the Solr - User mailing list archive at Nabble.com.