Re: [MarkLogic Dev General] New Feature Request: Unique Value Range Indexes

2014-06-11 Thread Geert Josten
-boun...@developer.marklogic.com <mailto:general-boun...@developer.marklogic.com> [general-boun...@developer.marklogic.com <mailto:general-boun...@developer.marklogic.com> ] on behalf of Ron Hitchens [r...@ronsoft.com <mailto:r...@ronsoft.com> ] Sent: 04 June 2014 19:31 To: MarkLog

Re: [MarkLogic Dev General] New Feature Request: Unique Value Range Indexes

2014-06-11 Thread Geert Josten
chens Verzonden: donderdag 5 juni 2014 00:19 Aan: MarkLogic Developer Discussion Onderwerp: Re: [MarkLogic Dev General] New Feature Request: Unique Value Range Indexes Unless your unique-uri() function is running in a non-update query, in which case it runs lock free at a timestamp. If you'

Re: [MarkLogic Dev General] New Feature Request: Unique Value Range Indexes

2014-06-04 Thread Ron Hitchens
ock and the other would fail and retry. >>>> Maybe I'm missing something though. >>>> >>>> But anyway, I agree unique indexes would be a handy feature. e.g. our docs >>>> have a DOI element which *should* be unique but occasionally aren't, w

Re: [MarkLogic Dev General] New Feature Request: Unique Value Range Indexes

2014-06-04 Thread Ron Hitchens
oun...@developer.marklogic.com] on behalf of Ron Hitchens > [r...@ronsoft.com] > Sent: 04 June 2014 19:31 > To: MarkLogic Developer Discussion > Subject: Re: [MarkLogic Dev General] New Feature Request: Unique Value Range > Indexes > > Rob, > > I believe there is

Re: [MarkLogic Dev General] New Feature Request: Unique Value Range Indexes

2014-06-04 Thread Wayne Feick
gic.com [general-boun...@developer.marklogic.com] on behalf of Ron Hitchens [r...@ronsoft.com] Sent: 04 June 2014 19:31 To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] New Feature Request: Unique Value Range Indexes Rob, I believe there is a race condition here.

Re: [MarkLogic Dev General] New Feature Request: Unique Value Range Indexes

2014-06-04 Thread Ron Hitchens
ich *should* be unique but occasionally aren't, would >> be nice to enforce that rather than have to code defensively. >> >> Rob >> ________________________ >> From: general-boun...@developer.marklogic.com >> [general-boun...@developer.marklogic.com] on beha

Re: [MarkLogic Dev General] New Feature Request: Unique Value Range Indexes

2014-06-04 Thread Analyze That | Johan van den Brink
l-boun...@developer.marklogic.com>] On Behalf Of Whitby, Rob Sent: woensdag 4 juni 2014 19:59 To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] New Feature Request: Unique Value Range Indexes How about something like this? declare function unique-uri() { let $uri := &quo

Re: [MarkLogic Dev General] New Feature Request: Unique Value Range Indexes

2014-06-04 Thread David Ennis
zethat.nl > L: http://nl.linkedin.com/in/brinkjohanvanden > > -Original Message- > From: general-boun...@developer.marklogic.com [mailto: > general-boun...@developer.marklogic.com] On Behalf Of Whitby, Rob > Sent: woensdag 4 juni 2014 19:59 > To: MarkLogic Developer Discu

Re: [MarkLogic Dev General] New Feature Request: Unique Value Range Indexes

2014-06-04 Thread Analyze That | Johan van den Brink
r Discussion Subject: [MarkLogic Dev General] New Feature Request: Unique Value Range Indexes I'm working on a project, one aspect of which requires minting unique IDs and assuring that no two documents with the same ID wind up in the database. I know how to accomplish this using locks

Re: [MarkLogic Dev General] New Feature Request: Unique Value Range Indexes

2014-06-04 Thread Wayne Feick
arklogic.com [general-boun...@developer.marklogic.com] on behalf of Ron Hitchens [r...@ronsoft.com] Sent: 04 June 2014 19:31 To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] New Feature Request: Unique Value Range Indexes Rob, I believe there is a race condition here. A

Re: [MarkLogic Dev General] New Feature Request: Unique Value Range Indexes

2014-06-04 Thread Whitby, Rob
June 2014 19:31 To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] New Feature Request: Unique Value Range Indexes Rob, I believe there is a race condition here. A document may not exit as-of the timestamp when this request starts running, but some other request co

Re: [MarkLogic Dev General] New Feature Request: Unique Value Range Indexes

2014-06-04 Thread Ron Hitchens
John, What I'm interested in is not so much a strategy for generating unique IDs but rather imposing a constraint on the content in the database. Yes, there are ways of creating IDs that are very unlikely to clash, but that's not really the crux of the new feature I'm suggesting. I wan

Re: [MarkLogic Dev General] New Feature Request: Unique Value Range Indexes

2014-06-04 Thread John Snelson
On 04/06/2014 19:31, Ron Hitchens wrote: > In my case, the naming space is actually quite small because I want the > IDs to be meaningful but unique. For example "images:cats:fluffy:XX.png", > where XX can increment or be set randomly until the ID is unique. Make XX a random number. Or two

Re: [MarkLogic Dev General] New Feature Request: Unique Value Range Indexes

2014-06-04 Thread John Snelson
Maybe you could consider using sem:uuid() in MarkLogic 7? You are much better off with a statistically unique ID than actually taking the time and massive concurrency reduction to check uniqueness. John On 04/06/2014 18:01, Ron Hitchens wrote: > > I'm working on a project, one aspect of whi

Re: [MarkLogic Dev General] New Feature Request: Unique Value Range Indexes

2014-06-04 Thread Ron Hitchens
logic.com] on behalf of Ron Hitchens > [r...@ronsoft.com] > Sent: 04 June 2014 18:01 > To: MarkLogic Developer Discussion > Subject: [MarkLogic Dev General] New Feature Request: Unique Value Range > Indexes > > I'm working on a project, one aspect of which

Re: [MarkLogic Dev General] New Feature Request: Unique Value Range Indexes

2014-06-04 Thread Whitby, Rob
not that easy? Rob From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Ron Hitchens [r...@ronsoft.com] Sent: 04 June 2014 18:01 To: MarkLogic Developer Discussion Subject: [MarkLogic Dev General] New Feature Request

[MarkLogic Dev General] New Feature Request: Unique Value Range Indexes

2014-06-04 Thread Ron Hitchens
I'm working on a project, one aspect of which requires minting unique IDs and assuring that no two documents with the same ID wind up in the database. I know how to accomplish this using locks (I'm pretty sure) but any such implementation is awkward and prone to subtle edge case errors, and