You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Christian Moen (JIRA)" <ji...@apache.org> on 2012/06/01 03:55:23 UTC

[jira] [Commented] (SOLR-3498) ContentStreamUpdateRequest doesn't seem to respect setCommitWithin()

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

Christian Moen commented on SOLR-3498:
--------------------------------------

I've confirmed that this issue is reproducible on {{trunk}} as well.
                
> 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, 4.0
>            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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org