Hi!
I wrote a subclass of DisMaxQParserPlugin to add a little filter for
processing the "q" param and generate a "fq" param.
Ej.: "q=something field:value" becomes "q=something value&fq=field:value"

To do this, in the createParser method, I apply a regular expression
to the qstr param to obtain the fq part, and then I do the following:

NamedList<Object> paramsList = params.toNamedList();
paramsList.add(CommonParams.FQ, generatedFilterQuery);
params = SolrParams.toSolrParams(paramsList);
req.setParams(params);

The problem is when I include two "facet.field" in the request. In the
results (facets section) it prints "[Ljava.lang.String;@c77a748",
which is the result of a toString() over an String[] .

So, getting a little in deep in the code, I saw the method
SolrParams.toNameList() was saving the array correctly, but the method
SolrParams.toSolrParams(NamedList) was doing:
"params.getVal(i).toString()". So, it always loses the array.

Something similar occurs with the methods SolrParams.toMap() and
SolrParams.toMultiMap().

Is this a bug ?

thanks.
Nestor

Reply via email to