For indexes that are changing rapidly in NRT situations, fcs (stands for

Field Cache per Segment) may be a better choice than the default fc.
(saves memory)
see: http://wiki.apache.org/solr/SimpleFacetParameters#facet.method
pull/1/head
sixcooler 12 years ago
parent 3054a6d4b9
commit d5d8936f9d

@ -308,6 +308,7 @@ public abstract class AbstractSolrConnector implements SolrConnector {
params.setFacet(true); params.setFacet(true);
params.setFacetLimit(maxresults); params.setFacetLimit(maxresults);
params.setFacetSort(FacetParams.FACET_SORT_COUNT); params.setFacetSort(FacetParams.FACET_SORT_COUNT);
params.setParam(FacetParams.FACET_METHOD, FacetParams.FACET_METHOD_fcs);
params.setFields(fields); params.setFields(fields);
params.clearSorts(); params.clearSorts();
params.setIncludeScore(false); params.setIncludeScore(false);

@ -520,6 +520,7 @@ public final class QueryParams {
params.setFacet(true); params.setFacet(true);
params.setFacetLimit(this.maxfacets); params.setFacetLimit(this.maxfacets);
params.setFacetSort(FacetParams.FACET_SORT_COUNT); params.setFacetSort(FacetParams.FACET_SORT_COUNT);
params.setParam(FacetParams.FACET_METHOD, FacetParams.FACET_METHOD_fcs);
for (String field: this.facetfields) params.addFacetField(field); for (String field: this.facetfields) params.addFacetField(field);
} else { } else {
params.setFacet(false); params.setFacet(false);

Loading…
Cancel
Save