I don't have any notion if the document that needs to be "Update or Index"
nature exist.
If i need to use op_type parameter , i need the ID to a potentially same
document right.
Which i don't have in any way.
Thanks
Vineeth
On Mon, Mar 18, 2013 at 2:42 PM, Alexander Reelsen alr@spinscale.de wrote:
On Mon, 2013-03-18 at 14:53 +0530, Vineeth Mohan wrote:
I don't have any notion if the document that needs to be "Update or
Index" nature exist.
If i need to use op_type parameter , i need the ID to a potentially
same document right.
Which i don't have in any way.
Given that the only unique key constraint is on the _id, if you want to
detect clashes, then you need to put that info into the _id.
In a Perl module I wrote, I used the _ids from a separate index to apply
a unique constraint to a field other than _id in my main index:
I don't have any notion if the document that needs to be "Update or Index"
nature exist.
If i need to use op_type parameter , i need the ID to a potentially same
document right.
Which i don't have in any way.
Thanks
Vineeth
On Mon, Mar 18, 2013 at 2:42 PM, Alexander Reelsen alr@spinscale.dewrote:
On Mon, 2013-03-18 at 14:53 +0530, Vineeth Mohan wrote:
I don't have any notion if the document that needs to be "Update or
Index" nature exist.
If i need to use op_type parameter , i need the ID to a potentially
same document right.
Which i don't have in any way.
Given that the only unique key constraint is on the _id, if you want to
detect clashes, then you need to put that info into the _id.
In a Perl module I wrote, I used the _ids from a separate index to apply
a unique constraint to a field other than _id in my main index:
You have to know the certain field beforehand, collect the values, and
generate a cryptographic key of it (e.g. SHA-256). The key can be
formatted into base64 / hex characters and used for _id. In conjunction
with the "create" op_type and/or external versioning, you can implement
a strategy where you get a response if the document already exists.
I use this in the JDBC river.
Jörg
Am 18.03.13 10:29, schrieb Vineeth Mohan:
Here by duplicate , i dont mean duplicate docID but duplicate content
in certain fields.
You have to know the certain field beforehand, collect the values, and
generate a cryptographic key of it (e.g. SHA-256). The key can be formatted
into base64 / hex characters and used for _id. In conjunction with the
"create" op_type and/or external versioning, you can implement a strategy
where you get a response if the document already exists.
I use this in the JDBC river.
Jörg
Am 18.03.13 10:29, schrieb Vineeth Mohan:
Here by duplicate , i dont mean duplicate docID but duplicate content in
Again one more doubt.
Lets say if its a duplicate , i want to update the original document
(Increment the occurance field) , is it possible using this logic ?
Thanks
Vineeth
You have to know the certain field beforehand, collect the values, and
generate a cryptographic key of it (e.g. SHA-256). The key can be formatted
into base64 / hex characters and used for _id. In conjunction with the
"create" op_type and/or external versioning, you can implement a strategy
where you get a response if the document already exists.
I use this in the JDBC river.
Jörg
Am 18.03.13 10:29, schrieb Vineeth Mohan:
Here by duplicate , i dont mean duplicate docID but duplicate content in
Well, the version number from the original feed can be passed into the
update. That way, when you computed the updated version and went to write
it back, the version number would be checked and used to ensure that no
other updates were done to that record.
In case of failure due to version number mismatch, you could re-read the
record and re-compute the changes, and then try again.
I believe that would ensure an atomic update. There is no record
lock/read/update/unlock facility, of course. Which is a good thing!
On Monday, March 18, 2013 11:07:37 AM UTC-4, Vineeth Mohan wrote:
What if i want to modify the original feed based on the new feed instead
of rejecting the second feed ?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.