[
https://issues.apache.org/jira/browse/SOLR-10134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15889665#comment-15889665
]
Mikhail Khludnev commented on SOLR-10134:
-----------------------------------------
noticing warnings below, will check them soon
{code}
[ecj-lint] 1. WARNING in
C:\Users\jenkins\workspace\Lucene-Solr-6.x-Windows\solr\core\src\java\org\apache\solr\client\solrj\embedded\EmbeddedSolrServer.java
(at line 203)
[ecj-lint] new JavaBinCodec(resolver) {
[ecj-lint]
[ecj-lint] @Override
[ecj-lint] public void writeSolrDocument(SolrDocument doc) {
[ecj-lint] callback.streamSolrDocument(doc);
[ecj-lint] //super.writeSolrDocument( doc, fields );
[ecj-lint] }
[ecj-lint]
[ecj-lint] @Override
[ecj-lint] public void writeSolrDocumentList(SolrDocumentList
docs) throws IOException {
[ecj-lint] if (docs.size() > 0) {
[ecj-lint] SolrDocumentList tmp = new SolrDocumentList();
[ecj-lint] tmp.setMaxScore(docs.getMaxScore());
[ecj-lint] tmp.setNumFound(docs.getNumFound());
[ecj-lint] tmp.setStart(docs.getStart());
[ecj-lint] docs = tmp;
[ecj-lint] }
[ecj-lint] callback.streamDocListInfo(docs.getNumFound(),
docs.getStart(), docs.getMaxScore());
[ecj-lint] super.writeSolrDocumentList(docs);
[ecj-lint] }
[ecj-lint]
[ecj-lint] }.setWritableDocFields(resolver).
marshal(rsp.getValues(), out);
[ecj-lint]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ecj-lint] Resource leak: '<unassigned Closeable value>' is never closed
[ecj-lint] ----------
[ecj-lint] 2. WARNING in
C:\Users\jenkins\workspace\Lucene-Solr-6.x-Windows\solr\core\src\java\org\apache\solr\client\solrj\embedded\EmbeddedSolrServer.java
(at line 227)
[ecj-lint] return (NamedList<Object>) new
JavaBinCodec(resolver).unmarshal(in);
[ecj-lint] ^^^^^^^^^^^^^^^^^^^^^^^^^^
[ecj-lint] Resource leak: '<unassigned Closeable value>' is never closed
[ecj-lint] ----------
[ecj-lint] ----------
{code}
> EmbeddedSolrServer does not support SchemaAPI
> ---------------------------------------------
>
> Key: SOLR-10134
> URL: https://issues.apache.org/jira/browse/SOLR-10134
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: Server, SolrJ
> Affects Versions: 6.4.1
> Reporter: Robert Alexandersson
> Labels: test-driven
> Attachments: SOLR-10134.patch, SOLR-10134.patch, SOLR-10134.patch
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> The EmbeddedSolrServer server does not support calls to the POST methods of
> SchemaAPI using SolRJ api. The reason is that the httpMethod param is never
> set by the EmbeddedSolrServer#request(SolrRequest, String) and this is later
> required by the SchemaHandler class that actually performs the call at
> SchemaHandler#handleRequestBody(SolrQueryRequest, SolrQueryResponse).
> Proposal is to enhance the EmbeddedSolrServer to forward the httpMethod at
> aprox row 174 with the following: "req.getContext().put("httpMethod",
> request.getMethod().name());". This change requires the Factory methods of
> SolrJ to add the intended method to be used example : new
> SchemaRequest.AddField(....) should append the POST method similar to how the
> SchemaRequest.Field appends the GET method.
> I have written a separate EmbeddedSolrServer that replaces the one in SolR.
> It works for now and fields can be created on the fly using the SchemaAPI of
> the solrj client, but would like to be able to remove this workaround.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]