[ https://issues.apache.org/jira/browse/SOLR-12858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16734693#comment-16734693 ]
Peter Williams commented on SOLR-12858: --------------------------------------- I have (so far) been able to workaround this problem by switching queries to use GET instead of POST in my product's embedded Solr delegate. I have also explored what a proper fix might be, but need a much greater understanding of the underlying code and reasons behind the SOLR-12142 change. > EmbeddedSolrServer POST method has contentType issue > ---------------------------------------------------- > > Key: SOLR-12858 > URL: https://issues.apache.org/jira/browse/SOLR-12858 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Affects Versions: 7.4, 7.5 > Reporter: Phillip Klinefelter > Priority: Major > > EmbeddedSolrServer will fail with the following exception when using a POST > method. > {{org.apache.solr.common.SolrException: Bad contentType for search handler > :application/javabin request=\{q=*:*}}}{{ at > org.apache.solr.request.json.RequestUtil.processParams(RequestUtil.java:73)}} > {{ at > org.apache.solr.util.SolrPluginUtils.setDefaults(SolrPluginUtils.java:167)}} > {{ at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:196)}} > {{ at org.apache.solr.core.SolrCore.execute(SolrCore.java:2539)}} > {{ at > org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:191)}} > {{ at > org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:194)}} > {{ at org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:974)}} > {{ at org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:990)}} > A POST method can be added to TestEmbeddedSolrServerConstructors to reproduce > or do the following. > {{embeddedSolrServer.query(new SolrQuery("*:*"), SolrRequest.METHOD.POST);}} > This worked before Solr 7.4. The issue appears to have been caused by > changes made in SOLR-12142 based on debugging and a discussion I had with > [~dsmiley]. > CC [~noble.paul] > -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org