Author: tommaso
Date: Tue Jun 16 09:32:58 2015
New Revision: 1685747

URL: http://svn.apache.org/r1685747
Log:
OAK-2175 - added sample Lucene index configuration in docs

Modified:
    jackrabbit/oak/trunk/oak-doc/src/site/markdown/query/lucene.md

Modified: jackrabbit/oak/trunk/oak-doc/src/site/markdown/query/lucene.md
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-doc/src/site/markdown/query/lucene.md?rev=1685747&r1=1685746&r2=1685747&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-doc/src/site/markdown/query/lucene.md (original)
+++ jackrabbit/oak/trunk/oak-doc/src/site/markdown/query/lucene.md Tue Jun 16 
09:32:58 2015
@@ -798,7 +798,7 @@ From the Luke UI shown you can access va
 
 `@since Oak 1.1.17, 1.0.15`
 
-In order to use Lucene index to perform search suggestions, the index 
definition node (the one of type `oak:queryIndexConfiguration`)
+In order to use Lucene index to perform search suggestions, the index 
definition node (the one of type `oak:QueryIndexDefinition`)
  needs to have the `compatVersion` set to `2`, then one or more property 
nodes, depending on use case, need to have the 
  property `useForSuggest` set to `true`, such setting controls from which 
properties terms to be used for suggestions will be taken.
  
@@ -809,10 +809,29 @@ changed by setting the property `suggest
 
 `@since Oak 1.1.17, 1.0.13`
 
-In order to use Lucene index to perform spellchecking, the index definition 
node (the one of type `oak:queryIndexConfiguration`)
+In order to use Lucene index to perform spellchecking, the index definition 
node (the one of type `oak:QueryIndexDefinition`)
  needs to have the `compatVersion` set to `2`, then one or more property 
nodes, depending on use case, need to have the 
  property `useForSpellcheck` set to `true`, such setting controls from which 
properties terms to be used for spellcheck 
  corrections will be taken.
+ 
+Sample configuration for spellchecking based on terms contained in `jcr:title` 
property.
+
+```
+/oak:index/lucene-spellcheck
+  - jcr:primaryType = "oak:QueryIndexDefinition"
+  - compatVersion = 2
+  - type = "lucene"
+  - async = "async"
+  + indexRules
+    - jcr:primaryType = "nt:unstructured"
+    + nt:base
+      + properties
+        - jcr:primaryType = "nt:unstructured"
+        + jcr:title
+          - propertyIndex = true
+          - analyzed = true
+          - useForSpellcheck = true
+```
 
 ### Design Considerations
 


Reply via email to