[
https://issues.apache.org/jira/browse/SOLR-6984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14277991#comment-14277991
]
sriram vaithianathan commented on SOLR-6984:
--------------------------------------------
Fix : Class UpdateRequest.java
{code}
if (request != null) {
UpdateRequest urequest = (UpdateRequest) request.getRequest();
urequest.deleteById(deleteId, version);
} else {
UpdateRequest urequest = new UpdateRequest();
urequest.setParams(params);
urequest.setCommitWithin(getCommitWithin()); // This needs to be
added
urequest.deleteById(deleteId, version);
request = new LBHttpSolrServer.Req(urequest, urls);
routes.put(leaderUrl, request);
}
{code}
> Solr commitwithin is not happening for deletebyId
> -------------------------------------------------
>
> Key: SOLR-6984
> URL: https://issues.apache.org/jira/browse/SOLR-6984
> Project: Solr
> Issue Type: Bug
> Components: SolrJ
> Affects Versions: 4.10.3
> Reporter: sriram vaithianathan
> Fix For: 4.10.4
>
>
> Hi All,
> Just found that solrj doesnot use commitwithin while using deletebyid. This
> issue is discussed in
> http://grokbase.com/t/lucene/solr-user/1275gkpntd/deletebyid-commitwithin-question
> Faced the same issue today and found that, in
> org.apache.solr.client.solrj.request.UpdateRequest when new UpdateRequest is
> created in getRoutes() method ( Line number 244 ), the setCommitWithin param
> is not set in the urequest variable as it is done few lines above (Line
> number 204) This causes setCommitWithin to revert to default value of -1 and
> the commit does not happen. Tried setting that like,
> urequest.setCommitWithin(getCommitWithin()) and the feature is enabled from
> SolrJ.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]