lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: SolrJ: Setting multiple parameters
Date Sun, 20 Jun 2010 19:17:49 GMT

: *    solrQuery.setParam("stats.facet", "fieldA");
:     solrQuery.setParam("stats.facet", "fieldB");
:     solrQuery.setParam("stats.facet", "fieldC");*
: 
: But when I try to retrieve the "sum" values, it seems as if only the LAST
: setParam I called on "stats.facet" is taking. So in this case I can get the
: sum for fieldC, but not the other two:

It's a vararg method...
	setParam(String name, String... values) 

...so use...

  solrQuery.setParam("stats.facet", "fieldA", "fieldB", "fieldC");

...or if your list of fields is being dynamicly generated...

  String[] fieldsForStatFaceting = getStatsFacetFields();
  solrQuery.setParam("stats.facet", fieldsForStatFaceting);



-Hoss


Mime
View raw message