Swoorup Joshi created SOLR-7498:
-----------------------------------

             Summary: Error adding field 'stream_size'='null' msg=For input 
string: "null" using ContentStreamUpdateRequest
                 Key: SOLR-7498
                 URL: https://issues.apache.org/jira/browse/SOLR-7498
             Project: Solr
          Issue Type: Bug
          Components: SolrJ
    Affects Versions: 5.1
         Environment: Windows, Linux, Oracle Java SDK8
            Reporter: Swoorup Joshi


Using the solrj client to upload the file for indexing causing an SolrException 
error in solrj uploading to solr server. 

I am using the following code

ContentStreamUpdateRequest req = new 
ContentStreamUpdateRequest("/update/extract");
ContentStreamBase.FileStream fs = new FileStream(new File(filename));
req.setWaitSearcher(false);
req.setMethod(METHOD.POST );
req.addContentStream(fs);
req.setParam("literal.id", filename);
req.setParam("resource.name", filename);
NamedList<Object> result = this.mHttpSolrClient.request(req);

However, I am always getting an right after the request, which says

4767120 [qtp559670971-21] INFO  
org.apache.solr.update.processor.LogUpdateProcessor  [   test] – [test] 
webapp=/solr path=/update/extract 
params={waitSearcher=false&resource.name=/tmp/RUNNING.txt&literal.id=/tmp/RUNNING.txt&wt=javabin&version=2}
 {} 0 6
4767121 [qtp559670971-21] ERROR org.apache.solr.core.SolrCore  [   test] – 
org.apache.solr.common.SolrException: ERROR: [doc=/tmp/RUNNING.txt] Error 
adding field 'stream_size'='null' msg=For input string: "null"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to