Getting Exception with Versioning?


(Sam-4) #1

Hi All

I am using rabbitmq river to index document.i need to
implement Versioning,i have prepared following message format:

{ "create" : { "_index" :"idx_testtable", "_type" :"test_type", "_id"
:"1","_version" :1}}
{ "test_type" :{"id":1,"Description":"A computer is a programmable machine
designed to sequentially and automatically carry out a sequence of
arithmetic or logical operations"}}
{ "create" : { "_index" :"idx_testtable", "_type" :"test_type", "_id"
:"2","_version" :1}}
{ "test_type" :{"id":2,"Description":"The particular sequence of operations
can be changed readily, allowing the computer to solve more than one kind
of problem."}}
{ "create" : { "_index" :"idx_testtable", "_type" :"test_type", "_id"
:"3","_version" :1}}
{ "test_type" :{"id":3,"Description":"hello-world"}}
{ "create" : { "_index" :"idx_testtable", "_type" :"test_type", "_id"
:"4","_version" :1}}

after publishing message it got following exception:

[2012-03-26 16:09:11,696][INFO ][cluster.metadata ] [Test]
[idx_testtable] update_mapping [test_type]
[2012-03-26 16:09:11,783][WARN ][river.rabbitmq ] [Test]
[rabbitmq][river] failed to executefailure in bulk execution:
[0]: index [idx_testtable], type [test_type], id [1], message
[VersionConflictEngineException[[idx_testtable][2] [test_type][1]: version
conflict, current [-1], provided [1]]]
[1]: index [idx_testtable], type [test_type], id [2], message
[VersionConflictEngineException[[idx_testtable][3] [test_type][2]: version
conflict, current [-1], provided [1]]]
[2]: index [idx_testtable], type [test_type], id [3], message
[VersionConflictEngineException[[idx_testtable][4] [test_type][3]: version
conflict, current [-1], provided [1]]]
[3]: index [idx_testtable], type [test_type], id [4], message
[VersionConflictEngineException[[idx_testtable][0] [test_type][4]: version
conflict, current [-1], provided [1]

Initially all document having version 1,after updation it incremented.
please tell me implementing Versioning required,other configuration and
also where the problem and solution.

Thanks


(system) #2