Thanks Shawn. But after making the below changes (making versionable_chain as default) all my update,inserts & deleteByQuery are failing with the error "*Error from server at http://localhost:8888/solr/discovery <http://localhost:8888/solr/discovery>: DistributedUpdateProcessor must follow DocBasedVersionConstraintsProcessor*"
<updateRequestProcessorChain name="versionable_chain" default="true"> <processor class="solr.DocBasedVersionConstraintsProcessorFactory"> <str name="versionField">doc_version</str> <bool name="ignoreOldUpdates">false</bool> </processor> </updateRequestProcessorChain> On Thu, Dec 24, 2015 at 12:06 AM, Shawn Heisey <apa...@elyograg.org> wrote: > On 12/23/2015 10:30 AM, Debraj Manna wrote: > > For my use case I tried document centric versioning as mentioned here > > < > https://cwiki.apache.org/confluence/display/solr/Updating+Parts+of+Documents#UpdatingPartsofDocuments-DocumentCentricVersioningConstraints > >. > > But In my case this is not working I am seeing the document having > > version older is overwriting the newer ones. I have attached my > > solrconfig.xml. I have also added my version field in schema.xml as > > shown below:- > > <field name="doc_version" type="long" indexed="true" stored="true"/> > > > > I am updating the doc with solrJ as below:- > > solrClient.add(doc); > > solrClient.commit(); > > > > I am using solr 5.2.1 > > > > Can someone let me know what I am doing wrong? > > You have added the doc-based version processor to a processor chain > named "add-unknown-fields-to-the-schema" ... but I do not see anywhere > in your configuration where you have opted to *use* this processor > chain, and that chain has not been designated as the default chain. I > don't think that the processor chain is actually being used, so nothing > related to your doc_version field is being honored. > > In the data-driven example config, the processor chain is activated with > the following config: > > <initParams path="/update/**"> > <lst name="defaults"> > <str name="update.chain">add-unknown-fields-to-the-schema</str> > </lst> > </initParams> > > Thanks, > Shawn > >