[ 
https://issues.apache.org/jira/browse/SOLR-2025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12894974#action_12894974
 ] 

Reuben Firmin commented on SOLR-2025:
-------------------------------------

RLa asked for more details.

I snipped some lines (indicated by ...) from our code and the webapp container. 
Unfortunately the "caused by" exception is cut off by log4j/tomcat/something.

Here's everything that leads up to the query (flattened out - this is actually 
in several classes) - hopefully this will give you a path to the cause.

                        StringBuilder builder = new StringBuilder();

                        if (StringUtils.isEmpty(name)) {
                                builder.append("*:*");
                        } else {

                                if (!fuzzy) {
                                        builder.append("+name:\"");
                                        builder.append(name);
                                        builder.append("\"");
                                } else {
                                        builder.append("name:\"");
                                        builder.append(name);
                                        builder.append("\"");

                                        builder.append(" nameFuzzy:");
                                        builder.append(name);
                                }
                        }

                        if (types.length > 0) {

                                builder.append(" +type:(");

                                builder.append(types[0].name());

                                for (int i = 1; i < types.length; i++) {
                                        builder.append(" or ");
                                        builder.append(types[i].name());
                                }

                                builder.append(")");

                        }

                        SolrQuery query = new SolrQuery();
                        query.setQuery(builder.toString());
                        query.addField("score");
                        query.addSortField("score", SolrQuery.ORDER.desc);

                        CommonsHttpSolrServer server = new 
CommonsHttpSolrServer(url);
                        server.setAllowCompression(true);

                        QueryResponse rsp = server.query(query);

> SpellCheckResponse --.ClassCastException: 
> org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.util.List
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-2025
>                 URL: https://issues.apache.org/jira/browse/SOLR-2025
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - java
>    Affects Versions: 1.4.1
>            Reporter: Reuben Firmin
>
> org.apache.solr.client.solrj.SolrServerException: Error executing query
>         at 
> org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:95)
>         at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:118)
> ...
> Caused by: java.lang.ClassCastException: 
> org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.util.List
>         at 
> org.apache.solr.client.solrj.response.SpellCheckResponse$Suggestion.<init>(SpellCheckResponse.java:107)
>         at 
> org.apache.solr.client.solrj.response.SpellCheckResponse.<init>(SpellCheckResponse.java:51)
>         at 
> org.apache.solr.client.solrj.response.QueryResponse.extractSpellCheckInfo(QueryResponse.java:125)
>         at 
> org.apache.solr.client.solrj.response.QueryResponse.setResponse(QueryResponse.java:115)
>         at 
> org.apache.solr.client.solrj.response.QueryResponse.<init>(QueryResponse.java:80)
>         at 
> org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:89)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to