You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by da...@apache.org on 2015/03/24 12:41:37 UTC

svn commit: r1668851 - in /jackrabbit/oak/trunk/oak-doc/src/site/markdown/query: ordered-index-migrate.md ordered-index.md query.md

Author: davide
Date: Tue Mar 24 11:41:37 2015
New Revision: 1668851

URL: http://svn.apache.org/r1668851
Log:
OAK-2653 - Deprecate ordered index

- added doc about the deprecation

Added:
    jackrabbit/oak/trunk/oak-doc/src/site/markdown/query/ordered-index-migrate.md
    jackrabbit/oak/trunk/oak-doc/src/site/markdown/query/ordered-index.md
Modified:
    jackrabbit/oak/trunk/oak-doc/src/site/markdown/query/query.md

Added: jackrabbit/oak/trunk/oak-doc/src/site/markdown/query/ordered-index-migrate.md
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-doc/src/site/markdown/query/ordered-index-migrate.md?rev=1668851&view=auto
==============================================================================
--- jackrabbit/oak/trunk/oak-doc/src/site/markdown/query/ordered-index-migrate.md (added)
+++ jackrabbit/oak/trunk/oak-doc/src/site/markdown/query/ordered-index-migrate.md Tue Mar 24 11:41:37 2015
@@ -0,0 +1,58 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+  -->
+
+# Migrating Ordered Index to Lucene Property
+
+A quick step-by-step on how to migrate from the ordered index to
+lucene.
+
+Assuming you have the following ordered index configuration
+
+    {
+        ...
+        "declaringNodeTypes" : "nt:unstructured",
+        "direction" : "ascending",
+        "propertyNames" : "foobar",
+        "type" : "ordered"
+        ...
+    }
+
+the related lucene configuration will be
+
+    {
+        "jcr:primaryType" : "oak:QueryIndexDefinition",
+        "compatVersion" : 2,
+        "type" : "lucene",
+        "async" : "async",
+        "indexRules" : {
+            "jcr:primaryType" : "nt:unstructured",
+            "nt:unstructured" : {
+                "properties" : {
+                    "jcr:primaryType" : "nt:unstructured",
+                    "foobar" : {
+                        "propertyIndex" : true,
+                        "name" : "foobar",
+                        "ordered" : true
+                    }
+                }
+            }
+        }
+    }
+
+for all the details around the configuration of Lucene index and
+additional flags, please refer to the
+[index documetation](lucene.html).

Added: jackrabbit/oak/trunk/oak-doc/src/site/markdown/query/ordered-index.md
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-doc/src/site/markdown/query/ordered-index.md?rev=1668851&view=auto
==============================================================================
--- jackrabbit/oak/trunk/oak-doc/src/site/markdown/query/ordered-index.md (added)
+++ jackrabbit/oak/trunk/oak-doc/src/site/markdown/query/ordered-index.md Tue Mar 24 11:41:37 2015
@@ -0,0 +1,60 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+  -->
+
+# Ordered Index (deprecated since 1.1.8)
+
+Extension of the Property index will keep the order of the indexed
+property persisted in the repository.
+
+Used to speed-up queries with `ORDER BY` clause, _equality_ and
+_range_ ones.
+
+    SELECT * FROM [nt:base] ORDER BY jcr:lastModified
+    
+    SELECT * FROM [nt:base] WHERE jcr:lastModified > $date
+    
+    SELECT * FROM [nt:base] WHERE jcr:lastModified < $date
+    
+    SELECT * FROM [nt:base]
+    WHERE jcr:lastModified > $date1 AND jcr:lastModified < $date2
+
+    SELECT * FROM [nt:base] WHERE [jcr:uuid] = $id
+
+To define a property index on a subtree you have to add an index
+definition node that:
+
+* must be of type `oak:QueryIndexDefinition`
+* must have the `type` property set to __`ordered`__
+* contains the `propertyNames` property that indicates what properties
+  will be stored in the index.  `propertyNames` has to be a single
+  value list of type `Name[]`
+
+_Optionally_ you can specify
+
+* the `reindex` flag which when set to `true`, triggers a full content
+  re-index.
+* The direction of the sorting by specifying a `direction` property of
+  type `String` of value `ascending` or `descending`. If not provided
+  `ascending` is the default.
+* The index can be defined as asynchronous by providing the property
+  `async=async`
+
+_Caveats_
+
+* In case deploying on the index on a clustered mongodb you have to
+  define it as asynchronous by providing `async=async` in the index
+  definition. This is to avoid cluster merges.

Modified: jackrabbit/oak/trunk/oak-doc/src/site/markdown/query/query.md
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-doc/src/site/markdown/query/query.md?rev=1668851&r1=1668850&r2=1668851&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-doc/src/site/markdown/query/query.md (original)
+++ jackrabbit/oak/trunk/oak-doc/src/site/markdown/query/query.md Tue Mar 24 11:41:37 2015
@@ -281,52 +281,17 @@ To temporarily disable an index (for exa
 Please note that while the index type is not set, the index is not updated, so if you enable it again,
 it might not be correct. This is specially important for synchronous indexes.
 
-### The Ordered Index
+### The Ordered Index (deprecated since 1.1.8)
 
-NOTE: This index type has been deprecated. 
-Please use the Lucene Property Index instead, which offers the same features.
+This index has been deprecated in favour of Lucene Property
+index. Please refer to [Lucene Index documentation](lucene.html) for
+details.
 
-Extension of the Property index will keep the order of the indexed
-property persisted in the repository.
+For help on migrating to a Lucece index please refer to:
+[Migrate ordered index](ordered-index-migrate.html)
 
-Used to speed-up queries with `ORDER BY` clause, _equality_ and
-_range_ ones.
-
-    SELECT * FROM [nt:base] ORDER BY jcr:lastModified
-    
-    SELECT * FROM [nt:base] WHERE jcr:lastModified > $date
-    
-    SELECT * FROM [nt:base] WHERE jcr:lastModified < $date
-    
-    SELECT * FROM [nt:base]
-    WHERE jcr:lastModified > $date1 AND jcr:lastModified < $date2
-
-    SELECT * FROM [nt:base] WHERE [jcr:uuid] = $id
-
-To define a property index on a subtree you have to add an index
-definition node that:
-
-* must be of type `oak:QueryIndexDefinition`
-* must have the `type` property set to __`ordered`__
-* contains the `propertyNames` property that indicates what properties
-  will be stored in the index.  `propertyNames` has to be a single
-  value list of type `Name[]`
-
-_Optionally_ you can specify
-
-* the `reindex` flag which when set to `true`, triggers a full content
-  re-index.
-* The direction of the sorting by specifying a `direction` property of
-  type `String` of value `ascending` or `descending`. If not provided
-  `ascending` is the default.
-* The index can be defined as asynchronous by providing the property
-  `async=async`
-
-_Caveats_
-
-* In case deploying on the index on a clustered mongodb you have to
-  define it as asynchronous by providing `async=async` in the index
-  definition. This is to avoid cluster merges.
+For historical information around the index please refer to:
+[Ordered Index](ordered-index.html).
 
 ### Cost Calculation