Dear Wiki user, You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The following page has been changed by PieterCoucke: http://wiki.apache.org/solr/EmbeddedSolr The comment on the change is: Code for faceted browsing ------------------------------------------------------------------------------ HashMap params = new HashMap(); params.put("facet","true"); params.put("facet.field","cat"); + // For multiple fields, use this + //params.put("facet.field",new String[]{"cat","manu_exact"}); + + // Include a "null" result in the facet count which indicates the + // number of items that don't have a value for the facet + params.put("facet.missing","true"); + + // Add this if you use faceted browsing and want to limit the results + // based on the selection made by the user + //params.put("fq",new String[]{"manu_exact:dell","cat:laptop"}); SolrQueryResponse response = search("ipod", params); System.out.println("response = " + response.getValues().get("facet_counts"));
