jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1394429 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/plugins/type/ main/resources/org/apache/jackrabbit/oak/plugins/type/ test/resources/org/apache/jackrabbit/oak/query/
Date Fri, 05 Oct 2012 10:13:16 GMT
Author: alexparvulescu
Date: Fri Oct  5 10:13:15 2012
New Revision: 1394429

URL: http://svn.apache.org/viewvc?rev=1394429&view=rev
Log:
OAK-365 Add Query Index definition node type

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/InitialContent.java
    jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/type/builtin_nodetypes.cnd
    jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/sql2_measure.txt

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/InitialContent.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/InitialContent.java?rev=1394429&r1=1394428&r2=1394429&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/InitialContent.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/InitialContent.java
Fri Oct  5 10:13:15 2012
@@ -78,7 +78,7 @@ public class InitialContent extends Defa
         if (!root.hasChildNode("oak:index")) {
             // FIXME: user-mgt related unique properties (rep:authorizableId, rep:principalName)
are implementation detail and not generic for repo
             // FIXME: rep:principalName only needs to be unique if defined with user/group
nodes -> add defining nt-info to uniqueness constraint otherwise ac-editing will fail.
-            mk.commit("/", "+\"oak:index\":{\"jcr:uuid\":{\"unique\":true},\"rep:authorizableId\":{\"unique\":true},\"rep:principalName\":{\"unique\":true}}",
null, null);
+            mk.commit("/", "+\"oak:index\":{\"jcr:uuid\":{\"jcr:primaryType\":\"nam:oak:queryIndexDefinition\",\"unique\":true},\"rep:authorizableId\":{\"jcr:primaryType\":\"nam:oak:queryIndexDefinition\",\"unique\":true},\"rep:principalName\":{\"jcr:primaryType\":\"nam:oak:queryIndexDefinition\",\"unique\":true}}",
null, null);
         }
 
         BuiltInNodeTypes.register(createRoot(mk));

Modified: jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/type/builtin_nodetypes.cnd
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/type/builtin_nodetypes.cnd?rev=1394429&r1=1394428&r2=1394429&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/type/builtin_nodetypes.cnd
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/type/builtin_nodetypes.cnd
Fri Oct  5 10:13:15 2012
@@ -19,6 +19,7 @@
 <jcr='http://www.jcp.org/jcr/1.0'>
 <nt='http://www.jcp.org/jcr/nt/1.0'>
 <mix='http://www.jcp.org/jcr/mix/1.0'>
+<oak='http://jackrabbit.apache.org/oak/ns/1.0'>
 
 //------------------------------------------------------------------------------
 // B A S E  T Y P E
@@ -464,6 +465,19 @@
   - jcr:statement (STRING)
   - jcr:language (STRING)
 
+/**
+ * Index definitions storage
+ *
+ * @since oak 0.6
+ */
+[oak:queryIndexDefinition] > nt:unstructured
+  - type (STRING)
+  - reindex (BOOLEAN) mandatory IGNORE
+
+//  - type (STRING)
+//  + reindex (BOOLEAN)
+//  - * (UNDEFINED)
+
 //------------------------------------------------------------------------------
 // L I F E C Y C L E   M A N A G E M E N T
 //------------------------------------------------------------------------------

Modified: jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/sql2_measure.txt
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/sql2_measure.txt?rev=1394429&r1=1394428&r2=1394429&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/sql2_measure.txt
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/sql2_measure.txt
Fri Oct  5 10:13:15 2012
@@ -27,52 +27,52 @@ commit / + "parents": { "p0": {"id": "0"
 commit / + "children": { "c1": {"p": "1"}, "c2": {"p": "1"}, "c3": {"p": "2"}, "c4": {"p":
"3"}}
 
 measure select * from [nt:base] as c right outer join [nt:base] as p on p.id = c.p where
p.id is not null and not isdescendantnode(p, '/jcr:system')
-c, 663
-p, 221
+c, 672
+p, 224
 query, 4
 
 measure select * from [nt:base] as p left outer join [nt:base] as c on p.id = c.p where p.id
is not null
-c, 663
-p, 221
+c, 672
+p, 224
 query, 4
 
 measure select * from [nt:base] as p left outer join [nt:base] as c on p.id = c.p where p.id
is not null and c.p is null
-c, 663
-p, 221
+c, 672
+p, 224
 query, 1
 
 measure select * from [nt:base] as p left outer join [nt:base] as c on p.id = c.p where p.id
is not null and c.p is not null
-c, 663
-p, 221
+c, 672
+p, 224
 query, 3
 
 measure select * from [nt:base] as p inner join [nt:base] as c on p.id = c.p
-c, 663
-p, 221
+c, 672
+p, 224
 query, 3
 
 measure select * from [nt:base] as c right outer join [nt:base] as p on p.id = c.p where
p.id is not null and not isdescendantnode(p, '/jcr:system')
-c, 663
-p, 221
+c, 672
+p, 224
 query, 4
 
 measure select * from [nt:base] as p left outer join [nt:base] as c on p.id = c.p where p.id
is not null
-c, 663
-p, 221
+c, 672
+p, 224
 query, 4
 
 measure select * from [nt:base] as p left outer join [nt:base] as c on p.id = c.p where p.id
is not null and c.p is null
-c, 663
-p, 221
+c, 672
+p, 224
 query, 1
 
 measure select * from [nt:base] as p left outer join [nt:base] as c on p.id = c.p where p.id
is not null and c.p is not null
-c, 663
-p, 221
+c, 672
+p, 224
 query, 3
 
 measure select * from [nt:base] as p inner join [nt:base] as c on p.id = c.p
-c, 663
-p, 221
+c, 672
+p, 224
 query, 3
 



Mime
View raw message