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

Reply via email to