[jira] [Commented] (SOLR-12858) EmbeddedSolrServer POST method has contentType issue

2019-07-23 Thread Richard Walker (JIRA)


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

Richard Walker commented on SOLR-12858:
---

Just ran into this on 8.1.1.

I use an HttpSolrClient with a standalone Solr for production use, but an 
EmbeddedSolrServer for my test suite.

I just switched from GET to POST precisely to cope with large query strings, 
and now my test suite fails. Workaround for now in this case is to change my 
search method to do an instanceof test on the client before running the query, 
which (of course) is  the sort of thing I want to avoid.

 

> EmbeddedSolrServer POST method has contentType issue
> 
>
> Key: SOLR-12858
> URL: https://issues.apache.org/jira/browse/SOLR-12858
> Project: Solr
>  Issue Type: Bug
>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.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-12858) EmbeddedSolrServer POST method has contentType issue

2019-01-04 Thread Peter Williams (JIRA)


[ 
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