@@ -63,6 +63,40 @@ results from deeper in the result set.
6363 A nouveau index will inherit the partitioning type from the ``options.partitioned `` field
6464of the design document that contains it.
6565
66+ .. _ddoc/nouveau/lucene_upgrade :
67+
68+ Lucene Version Upgrade
69+ ======================
70+
71+ Nouveau has been upgraded to use Lucene 10, earlier releases used Lucene 9.
72+
73+ Nouveau can query and update indexes created by Lucene 9 but will not create new
74+ ones. The index definition can optionally define a ``lucene_version `` field
75+ (which must be either 9 or 10 expressed as an integer). If not specified
76+ when defining a new index the current version (10) will be automatically
77+ added to the definition.
78+
79+ As Lucene only supports indexes up to one major release behind the current, it
80+ is important to rebuild all indexes to the current release. As Lucene major
81+ releases are infrequent, and Nouveau supports 9 and 10 versions simultaneously
82+ it is only necessary to rebuild version 9 indexes before Nouveau upgrades to
83+ Lucene 11 (when it exists), and so the plugin rebuilds one index at a time as a
84+ background activity. A ``couch_scanner `` plugin is available to automate this
85+ process, and can be enabled as follows;
86+
87+ .. code-block :: ini
88+
89+ [couch_scanner_plugins]
90+ nouveau_index_upgrader = true
91+
92+ The plugin will scan all design documents for index definitions either with no
93+ ``lucene_version `` field or one equal to a previous version (lower than
94+ 10). The new index will be built by the plugin and, on successful
95+ completion, will update the ``lucene_version `` field in the index
96+ definition. Search requests against that index will seamlessly switch from the
97+ old index to the new one. Invoking the :ref: `_nouveau_cleanup <api/db/nouveau_cleanup >`
98+ will delete the old indexes.
99+
66100.. _ddoc/nouveau/field_types :
67101
68102Field Types
0 commit comments