diff --git a/oak-doc/src/site/markdown/query/indexing.md b/oak-doc/src/site/markdown/query/indexing.md
index 0e0d80a..3542dc8 100644
--- a/oak-doc/src/site/markdown/query/indexing.md
+++ b/oak-doc/src/site/markdown/query/indexing.md
@@ -426,6 +426,21 @@ NRT indexing expose a few configuration options as part of the [LuceneIndexProvi
to hold Lucene documents for indexing in the `nrt` mode.
The default size is 10000.
+## Superseding an Index
+This helps in replacing one index with another. Suppose we have the following indices:
+
+```
+ jcr:root
+ + oak:index
+ + sampleIndex1
+ - jcr:primaryType = "oak:QueryIndexDefinition"
+ + sampleIndex2
+ - jcr:primaryType = "oak:QueryIndexDefinition"
+```
+
+We add the properties `supersedes = ["/oak:index/sampleIndex1"]` and `reindex=true` to `sampleIndex2` and save those. As a
+result, the superseded index `sampleIndex1` would be disabled (by setting type=disabled property) during the next indexing cycle.
+
## Reindexing
Reindexing rarely solves problems.
diff --git a/oak-doc/src/site/markdown/query/lucene.md b/oak-doc/src/site/markdown/query/lucene.md
index 641d34c..0e79bfa 100644
--- a/oak-doc/src/site/markdown/query/lucene.md
+++ b/oak-doc/src/site/markdown/query/lucene.md
@@ -153,6 +153,8 @@ Below is the canonical index definition structure
- indexPath (string)
- codec (string)
- refresh (boolean)
+ - functionName (string)
+ - useIfExists (string)
+ indexRules (nt:unstructured)
+ aggregates (nt:unstructured)
+ analyzers (nt:unstructured)
@@ -352,7 +354,8 @@ structure
- notNullCheckEnabled (boolean) = false
- nullCheckEnabled (boolean) = false
- excludeFromAggregation (boolean) = false
- - weight (long) = -1
+ - weight (long) = 5
+ - function (string)
Following are the details about the above mentioned config options which can be
defined at the property definition level
@@ -717,7 +720,6 @@ The default analyzer can be configured via `analyzers/default` node
- jcr:primaryType = "oak:QueryIndexDefinition"
+ analyzers
+ default
- + pathText
...
```
@@ -775,6 +777,30 @@ all the other components (e.g. `charFilters`, `Synonym`) are optional.
+ synonym.txt (nt:file)
```
+#### Examples
+
+Adding stemming support
+```
+1. Use an analyzer which has stemming included by default e.g. EnglishAnalyzer which has PorterStemFilter.
+ + analyzers
+ + default
+ - class = "org.apache.lucene.analysis.en.EnglishAnalyzer"
+
+2. Use stemming as part of analyzer composition (using org.apache.lucene.analysis.hunspell.HunspellStemFilterFactory)
+ + analyzers
+ + default
+ + tokenizer
+ - name = "Standard"
+ + filters (nt:unstructured) //The filters needs to be ordered
+ + LowerCase
+ + HunspellStem
+ - dictionary = "en_gb.dic"
+ - affix = "en_gb.aff"
+ + en_gb.aff (nt:file)
+ + en_gb.dic (nt:file)
+
+```
+
Points to note
1. Name of filters, charFilters and tokenizer are formed by removing the