mirror of https://github.com/apache/lucene.git
SOLR-9193: Fix conflict between parameters of TermsComponent and json facet API
This commit is contained in:
parent
360c4da90b
commit
ad8b22d0b2
|
@ -65,7 +65,9 @@ public class TermsComponent extends SearchComponent {
|
|||
@Override
|
||||
public void prepare(ResponseBuilder rb) throws IOException {
|
||||
SolrParams params = rb.req.getParams();
|
||||
if (params.getBool(TermsParams.TERMS, false)) {
|
||||
|
||||
//the terms parameter is also used by json facet API. So we will get errors if we try to parse as boolean
|
||||
if (params.get(TermsParams.TERMS, "false").equals("true")) {
|
||||
rb.doTerms = true;
|
||||
} else {
|
||||
return;
|
||||
|
@ -86,7 +88,9 @@ public class TermsComponent extends SearchComponent {
|
|||
@Override
|
||||
public void process(ResponseBuilder rb) throws IOException {
|
||||
SolrParams params = rb.req.getParams();
|
||||
if (!params.getBool(TermsParams.TERMS, false)) return;
|
||||
if (!params.get(TermsParams.TERMS, "false").equals("true")) {
|
||||
return;
|
||||
}
|
||||
|
||||
String[] fields = params.getParams(TermsParams.TERMS_FIELD);
|
||||
|
||||
|
|
Loading…
Reference in New Issue