From: Dennis Schafroth Date: Thu, 9 Sep 2010 15:37:58 +0000 (+0200) Subject: Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/yaz X-Git-Tag: v4.1.4~16 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=c205a1feaf8e56abc17a0b761b16c35954f469b3;hp=-c Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/yaz --- c205a1feaf8e56abc17a0b761b16c35954f469b3 diff --combined src/solr.c index 817879f,734e365..c91cea8 --- a/src/solr.c +++ b/src/solr.c @@@ -257,7 -257,7 +257,7 @@@ int yaz_solr_decode_response(ODR o, Z_H rc_result = yaz_solr_decode_result(o, ptr, sr); /* TODO The check on hits is a work-around to avoid garbled facets on zero results from the SOLR server. * The work-around works because the results is before the facets in the xml. */ - if (rc_result == 0 && match_xml_node_attribute(ptr, "lst", "name", "facet_counts")) + if (rc_result == 0 && *sr->numberOfRecords > 0 && match_xml_node_attribute(ptr, "lst", "name", "facet_counts")) rc_facets = yaz_solr_decode_facet_counts(o, ptr, sr); } ret = rc_result + rc_facets; @@@ -356,6 -356,7 +356,7 @@@ int yaz_solr_encode_request(Z_HTTP_Requ Z_FacetList *facet_list = request->facetList; int limit = 0; yaz_add_name_value_str(encode, name, value, &i, "facet", "true"); + yaz_add_name_value_str(encode, name, value, &i, "facet.mincount", "1"); yaz_solr_encode_facet_list(encode, name, value, &i, facet_list, &limit); /* olimit = limit;