Christian Moen created SOLR-3498:
------------------------------------
Summary: ContentStreamUpdateRequest doesn't seem to respect
setCommitWithin()
Key: SOLR-3498
URL: https://issues.apache.org/jira/browse/SOLR-3498
Project: Solr
Issue Type: Bug
Components: update
Affects Versions: 3.6
Reporter: Christian Moen
I'm using the below code to post some office format files to Solr using SolrJ.
It seems like {{setCommitWithin()}} is ignored in my
{{ContentStreamUpdateRequest}} request, and that I need to use
{{setParam(UpdateParams.COMMIT_WITHIN, "...")}} instead to get the desired
effect.
{code}
SolrServer solrServer = new HttpSolrServer("http://localhost:8983/solr");
ContentStreamUpdateRequest updateRequest = new
ContentStreamUpdateRequest("/update/extract");
updateRequest.addFile(file);
updateRequest.setParam("literal.id", file.getName());
updateRequest.setCommitWithin(10000); // Does not work
//updateRequest.setParam(UpdateParams.COMMIT_WITHIN, "10000"); // Works
updateRequest.process(solrServer);
{code}
If I use the below
{code}
...
//updateRequest.setCommitWithin(10000); // Does not work
updateRequest.setParam(UpdateParams.COMMIT_WITHIN, "10000"); // Works
...
{code}
I get the desired result and a commit is being done.
I'm doing this on 3.x, but I believe this issue could apply to 4.x as well (by
quickly glancing over the code with tired eyes), but I haven't verified this,
yet.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]