Re: Disable increment of version counter on some update operations possible?

2014-01-20 Thread joa
Thanks Clinton -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://gr

Re: Disable increment of version counter on some update operations possible?

2014-01-20 Thread Clinton Gormley
There is no such thing as a partial update on the doc. Even if you use the update API, it still deletes the old document and indexes an entirely new document. Version numbers are essential for the internal workings of Elasticsearch. You cannot disable them. And as you found, external versions mus

Re: Disable increment of version counter on some update operations possible?

2014-01-20 Thread joa
Not when doing partial updates on the doc. I am always just updating the fields that have changed. -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearc

Re: Disable increment of version counter on some update operations possible?

2014-01-20 Thread InquiringMind
I don't understand your use case. By not checking or incrementing the version number, one user's changes could obliterate the changes made to those or even to other fields by other users in between that first users's get of the document and that users's subsequent version-less update. You will

Re: Disable increment of version counter on some update operations possible?

2014-01-20 Thread joa
I'd really like to use the versioning feature to ensure, that updates on critical fields will be done on the latest version. (Back to my video example, this could be changes on video access permissions or something). But when I am updating not critical fields I'd like the version to remain unc

Re: Disable increment of version counter on some update operations possible?

2014-01-20 Thread joergpra...@gmail.com
Are there any reasons for using versioning at all if you want to keep the same version? If you just drop versioning in your use case, does it make a difference? I just learned from the latest source that internal and external versioning have divergent semantics in the update action conflict detect

Re: Disable increment of version counter on some update operations possible?

2014-01-20 Thread joa
Sorry, I don't get it ;) Even when I set the version_type to external I also need to pass a version number greater the current doc version or my update will fail, right? Index: curl -XPUT 'http://localhost:9200/videos/video/1?version_type=external&version=100' -d '{ "name": "My video",

Re: Disable increment of version counter on some update operations possible?

2014-01-20 Thread joergpra...@gmail.com
It is possible, ES does not increment the version if the version type is external. Jörg -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr.

Re: Disable increment of version counter on some update operations possible?

2014-01-20 Thread joa
Hi Jörg, as I understand, even with external versioning its not possible to update a doc *without changing/not incrementing* the version number at all. 1. User A loads DOC123 with version 20 and locally starts editing critical fields 2. User B simply loads DOC123 to view/read only. A view cou

Re: Disable increment of version counter on some update operations possible?

2014-01-20 Thread joergpra...@gmail.com
You can use external versioning, no need for an issue. http://www.elasticsearch.org/blog/elasticsearch-versioning-support/ Jörg On Mon, Jan 20, 2014 at 11:58 AM, joa wrote: > Thanks for your effort, Brian. > I'll think about this (I'm working with node.js not with Java anyway), but > I alread

Re: Disable increment of version counter on some update operations possible?

2014-01-20 Thread joa
Thanks for your effort, Brian. I'll think about this (I'm working with node.js not with Java anyway), but I already opened an issue for this (https://github.com/elasticsearch/elasticsearch/issues/4791). -- You received this message because you are subscribed to the Google Groups "elasticsearch

Re: Disable increment of version counter on some update operations possible?

2014-01-17 Thread InquiringMind
Also, see https://groups.google.com/d/topic/elasticsearch/1152jRW_rQg/discussion for how easy it is to issue an index request in Java. Hardly any code at all. (Keep in mind the method name mismatch between the actual code and the on-line docs, but those issues are clearly shown in this post).

Re: Disable increment of version counter on some update operations possible?

2014-01-17 Thread InquiringMind
Not a lot of code at all. Just some code that will be a lot of fun to write. I did it with a lot more code, before I got into Jackson data binding. But I wanted a generic Document class that adapted to a schema; you won't need all that. First, get Jackson and add the following jars to your clas

Re: Disable increment of version counter on some update operations possible?

2014-01-17 Thread joa
David and Brian, thanks for you answers. Brian, that might work, but its a lot of code for a simple counter update. I hoped that there would be a flag like keepVersionNumber = true as parameter when updating. Do you think this might be a reasonable feature request or does it make no sense at al

Re: Disable increment of version counter on some update operations possible?

2014-01-17 Thread InquiringMind
Joa, To allow an existing document to be updated, replaced, or deleted, ElasticSearch implements the following behaviors: 1. Internal version numbers for a document start at 1 and increment by one after each update to a document. When indexing or deleting an existing document, an internal vers

Re: Disable increment of version counter on some update operations possible?

2014-01-17 Thread David Pilato
Not sure I fully understand the use case but AFAIK you can not keep the same version. If needed, you can try to manage version by yourself using external versioning:  http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-index_.html#index-versioning Note sure it helps though