lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <>
Subject [jira] [Commented] (SOLR-4020) SolrJ 4.0.0 not serializing multilple filter queries correctly
Date Thu, 01 Nov 2012 18:45:13 GMT


Hoss Man commented on SOLR-4020:

I've used 
SolrParams solrParams = SolrParams.toSolrParams(solrQuery.toNamedList()); 
QueryResponse queryResponse = solrServer.query(solrParams);

Well for starters: there's absolutely no reason for you to do that.

If you want to build up some SolrParams and then call solrServer.query(SolrParams) - just
construct a ModifiableSolrParams instance directly and pass it to that method -- it's just
a convinience method for building up a SolrQuery object for you.

If you want to build up a SolrQuery object and then pass it to SolrServer, that's what solrServer.request(SolrQuery)
is for.

There's no reason for converting to a NamedList
> SolrJ 4.0.0 not serializing multilple filter queries correctly
> --------------------------------------------------------------
>                 Key: SOLR-4020
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - java
>            Reporter: Indika Tantrigoda
>            Assignee: Hoss Man
>              Labels: solrclient, solrj
> Using multiple filter queries in a solrQuery causes an exception with the following details.
> org.apache.solr.common.SolrException: org.apache.lucene.queryparser.classic.ParseException:
Cannot parse '[Ljava.lang.String;@1ec278b5': Encountered "<EOF>" at line 1, column 28.
> Was expecting one of:
>     "TO" ...
>     <RANGE_QUOTED> ...
>     <RANGE_GOOP> ...
> The issues come up when using addFilterQuery() in the following manner:
> solrQuery.addFilterQuery("{!field f=facet_state}CA");
> solrQuery.addFilterQuery("{!field f=facet_city}Test City");
> or using it in the following way
> solrQuery.setFilterQueries("{!field f=facet_state}CA", "{!field f=facet_city}Test City");
> solrQuery.addFilterQuery("{!field f=facet_state}CA", "{!field f=facet_city}Test City");
> even if solrQuery.add() is used the issue still comes up
> solrQuery.add("fq", "your first filter");
> solrQuery.add("fq", "your second filter");
> In any case having multiple filter queries causes the issue.
> It seems that SolrJ is serializing a String[] instead of the separate String values. add() might be a good place to start the investigations.
> Thanks.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message