jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Mueller <muel...@adobe.com>
Subject Re: Identifier (UUID) handling
Date Tue, 29 May 2012 08:58:38 GMT
Hi,

>I'm fine with getNodeByUUID() relying on the query system. The query
>system on the other hand should be able to work even when no indexes
>are available, falling back to tree traversal when all else fails.

Yes, that's the current plan.

This is not an urgent feature, but if no index is available, I think a
warning should be logged. Otherwise people wonder why getNodeByUUID is
slow (at least for larger repositories) if no index is available (for
example because something is misconfigured). One way to do that is to
extend the query syntax, similar to the feature available in SQLite -
http://www.sqlite.org/lang_indexedby.html :

[indexed [by <indexName>] [or warn]]

For example the following query would log a warning (but still work) if no
index is available:
 
  select * from [nt:base] indexed or warn where [jcr:uuid] = 'xxx'

the following query would fail if no index is available:

  select * from [nt:base] indexed where [jcr:uuid] = 'xxx'

the following query would use an index if available, but not log a warning
if non is available:


  select * from [nt:base] where [jcr:uuid] = 'xxx'

Regards,

Thomas


Mime
View raw message