This is an automated email from the ASF dual-hosted git repository.

asf-ci-deploy pushed a commit to branch asf-site-production
in repository https://gitbox.apache.org/repos/asf/grails-website.git


The following commit(s) were added to refs/heads/asf-site-production by this 
push:
     new e17d2e4ccdd Deploying to documentation branch - 16:21:11
e17d2e4ccdd is described below

commit e17d2e4ccdd30b30c86a392e501f8be3ef8b0254
Author: codeconsole <[email protected]>
AuthorDate: Fri Jun 26 16:21:13 2026 +0000

    Deploying to documentation branch - 16:21:11
---
 docs/snapshot/api/index-all.html                   |  6 ++
 .../datastore/mapping/mongo/MongoDatastore.html    | 38 +++++++++
 .../grails-data/hibernate5/api/index-all.html      |  6 ++
 .../datastore/mapping/mongo/MongoDatastore.html    | 38 +++++++++
 .../grails-data/hibernate7/api/index-all.html      |  6 ++
 .../datastore/mapping/mongo/MongoDatastore.html    | 38 +++++++++
 .../grails-data/mongodb/api/index-all.html         |  6 ++
 .../datastore/mapping/mongo/MongoDatastore.html    | 38 +++++++++
 .../snapshot/grails-data/mongodb/manual/index.html | 91 ++++++++++++++++++++++
 .../mongodb/manual/introduction/releaseNotes.html  | 16 ++++
 .../mongodb/manual/querying/queryIndexes.html      | 75 ++++++++++++++++++
 docs/snapshot/guide/introduction.html              | 27 +++++++
 docs/snapshot/guide/single.html                    | 27 +++++++
 13 files changed, 412 insertions(+)

diff --git a/docs/snapshot/api/index-all.html b/docs/snapshot/api/index-all.html
index 4c6736ed8cd..127f5aad33d 100644
--- a/docs/snapshot/api/index-all.html
+++ b/docs/snapshot/api/index-all.html
@@ -28662,6 +28662,8 @@ if (location.href.indexOf('is-external=true') == -1) {
 </dt><dd> <div class="block"></div></dd>
 <dt><span class="strong"><a 
href="org/grails/orm/hibernate/cfg/ColumnConfig.html#index" title="Property in 
ColumnConfig">index</a></span> - Property in <a 
href="org/grails/orm/hibernate/cfg/ColumnConfig.html">ColumnConfig</a>
 </dt><dd> <div class="block">The index, can be either a boolean or a string 
for the name of the index</div></dd>
+<dt><span class="strong"><a 
href="org/grails/datastore/mapping/mongo/MongoDatastore.html#INDEX_EXPIRE_AFTER_SECONDS"
 title="Field in MongoDatastore">INDEX_EXPIRE_AFTER_SECONDS</a></span> - Field 
in <a 
href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">TTL index attribute. </div></dd>
 <dt><span class="strong"><a 
href="org/grails/databinding/IndexedPropertyReferenceDescriptor.html#index" 
title="Property in IndexedPropertyReferenceDescriptor">index</a></span> - 
Property in <a 
href="org/grails/databinding/IndexedPropertyReferenceDescriptor.html">IndexedPropertyReferenceDescriptor</a>
 </dt><dd> <div class="block"></div></dd>
 <dt><span class="strong"><a 
href="org/grails/datastore/mapping/mongo/config/MongoAttribute.html#index(java.lang.String)"
 title="Method in MongoAttribute">index(java.lang.String)</a></span> - Method 
in <a 
href="org/grails/datastore/mapping/mongo/config/MongoAttribute.html">MongoAttribute</a>
@@ -28674,6 +28676,10 @@ if (location.href.indexOf('is-external=true') == -1) {
 </dt><dd> <div class="block"> <DL><DT><B>Returns:</B></DT><DD>Whether this 
property is index</DD></DL></div></dd>
 <dt><span class="strong"><a 
href="org/grails/datastore/mapping/engine/PropertyValueIndexer.html#index(java.lang.Object,
 K)" title="Method in PropertyValueIndexer">index(java.lang.Object, 
K)</a></span> - Method in <a 
href="org/grails/datastore/mapping/engine/PropertyValueIndexer.html">PropertyValueIndexer</a>
 </dt><dd> <div class="block">Creates an index for the given value to the 
specified key</div></dd>
+<dt><span class="strong"><a 
href="org/grails/datastore/mapping/mongo/MongoDatastore.html#INDEX_RECREATE_ON_CONFLICT"
 title="Field in MongoDatastore">INDEX_RECREATE_ON_CONFLICT</a></span> - Field 
in <a 
href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">Opt-in index attribute: when an index already 
exists on the same keys with conflicting
+ options that cannot be reconciled in place (i.e. anything other than a TTL 
change), drop the
+ existing index and recreate it with the declared options instead of just 
logging the conflict.</div></dd>
 <dt><span class="strong"><a 
href="grails/rest/RestfulController.html#index(java.lang.Integer)" 
title="Method in RestfulController">index(java.lang.Integer)</a></span> - 
Method in <a href="grails/rest/RestfulController.html">RestfulController</a>
 </dt><dd> <div class="block">Lists all resources up to the given 
maximum</div></dd>
 <dt><span class="strong"><a 
href="org/grails/datastore/mapping/simple/engine/SimpleMapEntityPersister.1.html#index(java.lang.Object,
 java.lang.Object)" title="Method in 
SimpleMapEntityPersister.1">index(java.lang.Object, 
java.lang.Object)</a></span> - Method in <a 
href="org/grails/datastore/mapping/simple/engine/SimpleMapEntityPersister.1.html">SimpleMapEntityPersister.1</a>
diff --git 
a/docs/snapshot/api/org/grails/datastore/mapping/mongo/MongoDatastore.html 
b/docs/snapshot/api/org/grails/datastore/mapping/mongo/MongoDatastore.html
index c856acde6e1..649397c4bf5 100644
--- a/docs/snapshot/api/org/grails/datastore/mapping/mongo/MongoDatastore.html
+++ b/docs/snapshot/api/org/grails/datastore/mapping/mongo/MongoDatastore.html
@@ -151,6 +151,20 @@ implements <a 
href='../../../../../MappingContextListener.html'>MappingContextLi
                             <td class="colLast"></td>
                         </tr>
                         
+                        <tr class="altColor">
+                            <td 
class="colFirst"><code><strong>static&nbsp;java.lang.String</strong></code>&nbsp;</td>
+                            <td class="colLast"><code><a 
href="#INDEX_EXPIRE_AFTER_SECONDS">INDEX_EXPIRE_AFTER_SECONDS</a></code></td>
+                            <td class="colLast">TTL index attribute. </td>
+                        </tr>
+                        
+                        <tr class="rowColor">
+                            <td 
class="colFirst"><code><strong>static&nbsp;java.lang.String</strong></code>&nbsp;</td>
+                            <td class="colLast"><code><a 
href="#INDEX_RECREATE_ON_CONFLICT">INDEX_RECREATE_ON_CONFLICT</a></code></td>
+                            <td class="colLast">Opt-in index attribute: when 
an index already exists on the same keys with conflicting
+ options that cannot be reconciled in place (i.e. anything other than a TTL 
change), drop the
+ existing index and recreate it with the declared options instead of just 
logging the conflict.</td>
+                        </tr>
+                        
                         <tr class="altColor">
                             <td 
class="colFirst"><code><strong>static&nbsp;java.lang.String</strong></code>&nbsp;</td>
                             <td class="colLast"><code><a 
href="#SETTING_CONNECTION_STRING">SETTING_CONNECTION_STRING</a></code></td>
@@ -851,6 +865,30 @@ implements <a 
href='../../../../../MappingContextListener.html'>MappingContextLi
                             </li>
                         </ul>
                     
+                        <a name="INDEX_EXPIRE_AFTER_SECONDS"><!-- --></a>
+                        <ul class="blockListLast">
+                            <li class="blockList">
+                                
<h4>public&nbsp;static&nbsp;final&nbsp;java.lang.String 
<strong>INDEX_EXPIRE_AFTER_SECONDS</strong></h4>
+                                <p> TTL index attribute. MongoDB's 
IndexOptions#expireAfter(Long, TimeUnit)#expireAfter(Long, TimeUnit) is the only
+ way to set a TTL, but it is a two-argument setter that <a 
href='../../../../../org/grails/datastore/mapping/mongo/MongoConstants.html#mapToObject'
 title='MongoConstants.mapToObject'>MongoConstants.mapToObject</a>
+ cannot reach (that helper only invokes single-argument setters). So 
<CODE>expireAfterSeconds</CODE>
+ is pulled out of the index attributes and applied explicitly. TTL indexes are 
single-field
+ only — MongoDB silently ignores the option on a compound index.
+     </p>
+                            </li>
+                        </ul>
+                    
+                        <a name="INDEX_RECREATE_ON_CONFLICT"><!-- --></a>
+                        <ul class="blockListLast">
+                            <li class="blockList">
+                                
<h4>public&nbsp;static&nbsp;final&nbsp;java.lang.String 
<strong>INDEX_RECREATE_ON_CONFLICT</strong></h4>
+                                <p> Opt-in index attribute: when an index 
already exists on the same keys with conflicting
+ options that cannot be reconciled in place (i.e. anything other than a TTL 
change), drop the
+ existing index and recreate it with the declared options instead of just 
logging the conflict.
+     </p>
+                            </li>
+                        </ul>
+                    
                         <a name="SETTING_CONNECTION_STRING"><!-- --></a>
                         <ul class="blockListLast">
                             <li class="blockList">
diff --git a/docs/snapshot/grails-data/hibernate5/api/index-all.html 
b/docs/snapshot/grails-data/hibernate5/api/index-all.html
index 7dffba24030..c37fa4dfed3 100644
--- a/docs/snapshot/grails-data/hibernate5/api/index-all.html
+++ b/docs/snapshot/grails-data/hibernate5/api/index-all.html
@@ -11143,6 +11143,8 @@ if (location.href.indexOf('is-external=true') == -1) {
 </dt><dd> <div class="block"></div></dd>
 <dt><span class="strong"><a 
href="org/grails/orm/hibernate/cfg/ColumnConfig.html#index" title="Property in 
ColumnConfig">index</a></span> - Property in <a 
href="org/grails/orm/hibernate/cfg/ColumnConfig.html">ColumnConfig</a>
 </dt><dd> <div class="block">The index, can be either a boolean or a string 
for the name of the index</div></dd>
+<dt><span class="strong"><a 
href="org/grails/datastore/mapping/mongo/MongoDatastore.html#INDEX_EXPIRE_AFTER_SECONDS"
 title="Field in MongoDatastore">INDEX_EXPIRE_AFTER_SECONDS</a></span> - Field 
in <a 
href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">TTL index attribute. </div></dd>
 <dt><span class="strong"><a 
href="org/grails/datastore/mapping/mongo/config/MongoAttribute.html#index(java.lang.String)"
 title="Method in MongoAttribute">index(java.lang.String)</a></span> - Method 
in <a 
href="org/grails/datastore/mapping/mongo/config/MongoAttribute.html">MongoAttribute</a>
 </dt><dd> <div class="block">Configures the index type</div></dd>
 <dt><span class="strong"><a 
href="org/grails/datastore/mapping/mongo/config/MongoCollection.html#index(Map<String,
 Object>, Map<String, Object>)" title="Method in 
MongoCollection">index(Map&lt;String, Object&gt;, Map&lt;String, 
Object&gt;)</a></span> - Method in <a 
href="org/grails/datastore/mapping/mongo/config/MongoCollection.html">MongoCollection</a>
@@ -11153,6 +11155,10 @@ if (location.href.indexOf('is-external=true') == -1) {
 </dt><dd> <div class="block"> <DL><DT><B>Returns:</B></DT><DD>Whether this 
property is index</DD></DL></div></dd>
 <dt><span class="strong"><a 
href="org/grails/datastore/mapping/engine/PropertyValueIndexer.html#index(java.lang.Object,
 K)" title="Method in PropertyValueIndexer">index(java.lang.Object, 
K)</a></span> - Method in <a 
href="org/grails/datastore/mapping/engine/PropertyValueIndexer.html">PropertyValueIndexer</a>
 </dt><dd> <div class="block">Creates an index for the given value to the 
specified key</div></dd>
+<dt><span class="strong"><a 
href="org/grails/datastore/mapping/mongo/MongoDatastore.html#INDEX_RECREATE_ON_CONFLICT"
 title="Field in MongoDatastore">INDEX_RECREATE_ON_CONFLICT</a></span> - Field 
in <a 
href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">Opt-in index attribute: when an index already 
exists on the same keys with conflicting
+ options that cannot be reconciled in place (i.e. anything other than a TTL 
change), drop the
+ existing index and recreate it with the declared options instead of just 
logging the conflict.</div></dd>
 <dt><span class="strong"><a 
href="org/grails/datastore/mapping/mongo/config/MongoAttribute.html#INDEX_TYPE_2D"
 title="Field in MongoAttribute">INDEX_TYPE_2D</a></span> - Field in <a 
href="org/grails/datastore/mapping/mongo/config/MongoAttribute.html">MongoAttribute</a>
 </dt><dd> <div class="block"></div></dd>
 <dt><span class="strong"><a 
href="org/grails/datastore/mapping/mongo/config/MongoAttribute.html#INDEX_TYPE_2DSPHERE"
 title="Field in MongoAttribute">INDEX_TYPE_2DSPHERE</a></span> - Field in <a 
href="org/grails/datastore/mapping/mongo/config/MongoAttribute.html">MongoAttribute</a>
diff --git 
a/docs/snapshot/grails-data/hibernate5/api/org/grails/datastore/mapping/mongo/MongoDatastore.html
 
b/docs/snapshot/grails-data/hibernate5/api/org/grails/datastore/mapping/mongo/MongoDatastore.html
index f21ade1f669..c45a9b06ecf 100644
--- 
a/docs/snapshot/grails-data/hibernate5/api/org/grails/datastore/mapping/mongo/MongoDatastore.html
+++ 
b/docs/snapshot/grails-data/hibernate5/api/org/grails/datastore/mapping/mongo/MongoDatastore.html
@@ -151,6 +151,20 @@ implements <a 
href='../../../../../MappingContextListener.html'>MappingContextLi
                             <td class="colLast"></td>
                         </tr>
                         
+                        <tr class="altColor">
+                            <td 
class="colFirst"><code><strong>static&nbsp;java.lang.String</strong></code>&nbsp;</td>
+                            <td class="colLast"><code><a 
href="#INDEX_EXPIRE_AFTER_SECONDS">INDEX_EXPIRE_AFTER_SECONDS</a></code></td>
+                            <td class="colLast">TTL index attribute. </td>
+                        </tr>
+                        
+                        <tr class="rowColor">
+                            <td 
class="colFirst"><code><strong>static&nbsp;java.lang.String</strong></code>&nbsp;</td>
+                            <td class="colLast"><code><a 
href="#INDEX_RECREATE_ON_CONFLICT">INDEX_RECREATE_ON_CONFLICT</a></code></td>
+                            <td class="colLast">Opt-in index attribute: when 
an index already exists on the same keys with conflicting
+ options that cannot be reconciled in place (i.e. anything other than a TTL 
change), drop the
+ existing index and recreate it with the declared options instead of just 
logging the conflict.</td>
+                        </tr>
+                        
                         <tr class="altColor">
                             <td 
class="colFirst"><code><strong>static&nbsp;java.lang.String</strong></code>&nbsp;</td>
                             <td class="colLast"><code><a 
href="#SETTING_CONNECTION_STRING">SETTING_CONNECTION_STRING</a></code></td>
@@ -851,6 +865,30 @@ implements <a 
href='../../../../../MappingContextListener.html'>MappingContextLi
                             </li>
                         </ul>
                     
+                        <a name="INDEX_EXPIRE_AFTER_SECONDS"><!-- --></a>
+                        <ul class="blockListLast">
+                            <li class="blockList">
+                                
<h4>public&nbsp;static&nbsp;final&nbsp;java.lang.String 
<strong>INDEX_EXPIRE_AFTER_SECONDS</strong></h4>
+                                <p> TTL index attribute. MongoDB's 
IndexOptions#expireAfter(Long, TimeUnit)#expireAfter(Long, TimeUnit) is the only
+ way to set a TTL, but it is a two-argument setter that <a 
href='../../../../../org/grails/datastore/mapping/mongo/MongoConstants.html#mapToObject'
 title='MongoConstants.mapToObject'>MongoConstants.mapToObject</a>
+ cannot reach (that helper only invokes single-argument setters). So 
<CODE>expireAfterSeconds</CODE>
+ is pulled out of the index attributes and applied explicitly. TTL indexes are 
single-field
+ only — MongoDB silently ignores the option on a compound index.
+     </p>
+                            </li>
+                        </ul>
+                    
+                        <a name="INDEX_RECREATE_ON_CONFLICT"><!-- --></a>
+                        <ul class="blockListLast">
+                            <li class="blockList">
+                                
<h4>public&nbsp;static&nbsp;final&nbsp;java.lang.String 
<strong>INDEX_RECREATE_ON_CONFLICT</strong></h4>
+                                <p> Opt-in index attribute: when an index 
already exists on the same keys with conflicting
+ options that cannot be reconciled in place (i.e. anything other than a TTL 
change), drop the
+ existing index and recreate it with the declared options instead of just 
logging the conflict.
+     </p>
+                            </li>
+                        </ul>
+                    
                         <a name="SETTING_CONNECTION_STRING"><!-- --></a>
                         <ul class="blockListLast">
                             <li class="blockList">
diff --git a/docs/snapshot/grails-data/hibernate7/api/index-all.html 
b/docs/snapshot/grails-data/hibernate7/api/index-all.html
index d77871b4119..477b1b0b386 100644
--- a/docs/snapshot/grails-data/hibernate7/api/index-all.html
+++ b/docs/snapshot/grails-data/hibernate7/api/index-all.html
@@ -11143,6 +11143,8 @@ if (location.href.indexOf('is-external=true') == -1) {
 </dt><dd> <div class="block"></div></dd>
 <dt><span class="strong"><a 
href="org/grails/orm/hibernate/cfg/ColumnConfig.html#index" title="Property in 
ColumnConfig">index</a></span> - Property in <a 
href="org/grails/orm/hibernate/cfg/ColumnConfig.html">ColumnConfig</a>
 </dt><dd> <div class="block">The index, can be either a boolean or a string 
for the name of the index</div></dd>
+<dt><span class="strong"><a 
href="org/grails/datastore/mapping/mongo/MongoDatastore.html#INDEX_EXPIRE_AFTER_SECONDS"
 title="Field in MongoDatastore">INDEX_EXPIRE_AFTER_SECONDS</a></span> - Field 
in <a 
href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">TTL index attribute. </div></dd>
 <dt><span class="strong"><a 
href="org/grails/datastore/mapping/mongo/config/MongoAttribute.html#index(java.lang.String)"
 title="Method in MongoAttribute">index(java.lang.String)</a></span> - Method 
in <a 
href="org/grails/datastore/mapping/mongo/config/MongoAttribute.html">MongoAttribute</a>
 </dt><dd> <div class="block">Configures the index type</div></dd>
 <dt><span class="strong"><a 
href="org/grails/datastore/mapping/mongo/config/MongoCollection.html#index(Map<String,
 Object>, Map<String, Object>)" title="Method in 
MongoCollection">index(Map&lt;String, Object&gt;, Map&lt;String, 
Object&gt;)</a></span> - Method in <a 
href="org/grails/datastore/mapping/mongo/config/MongoCollection.html">MongoCollection</a>
@@ -11153,6 +11155,10 @@ if (location.href.indexOf('is-external=true') == -1) {
 </dt><dd> <div class="block"> <DL><DT><B>Returns:</B></DT><DD>Whether this 
property is index</DD></DL></div></dd>
 <dt><span class="strong"><a 
href="org/grails/datastore/mapping/engine/PropertyValueIndexer.html#index(java.lang.Object,
 K)" title="Method in PropertyValueIndexer">index(java.lang.Object, 
K)</a></span> - Method in <a 
href="org/grails/datastore/mapping/engine/PropertyValueIndexer.html">PropertyValueIndexer</a>
 </dt><dd> <div class="block">Creates an index for the given value to the 
specified key</div></dd>
+<dt><span class="strong"><a 
href="org/grails/datastore/mapping/mongo/MongoDatastore.html#INDEX_RECREATE_ON_CONFLICT"
 title="Field in MongoDatastore">INDEX_RECREATE_ON_CONFLICT</a></span> - Field 
in <a 
href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">Opt-in index attribute: when an index already 
exists on the same keys with conflicting
+ options that cannot be reconciled in place (i.e. anything other than a TTL 
change), drop the
+ existing index and recreate it with the declared options instead of just 
logging the conflict.</div></dd>
 <dt><span class="strong"><a 
href="org/grails/datastore/mapping/mongo/config/MongoAttribute.html#INDEX_TYPE_2D"
 title="Field in MongoAttribute">INDEX_TYPE_2D</a></span> - Field in <a 
href="org/grails/datastore/mapping/mongo/config/MongoAttribute.html">MongoAttribute</a>
 </dt><dd> <div class="block"></div></dd>
 <dt><span class="strong"><a 
href="org/grails/datastore/mapping/mongo/config/MongoAttribute.html#INDEX_TYPE_2DSPHERE"
 title="Field in MongoAttribute">INDEX_TYPE_2DSPHERE</a></span> - Field in <a 
href="org/grails/datastore/mapping/mongo/config/MongoAttribute.html">MongoAttribute</a>
diff --git 
a/docs/snapshot/grails-data/hibernate7/api/org/grails/datastore/mapping/mongo/MongoDatastore.html
 
b/docs/snapshot/grails-data/hibernate7/api/org/grails/datastore/mapping/mongo/MongoDatastore.html
index 35654406c58..8567a0eb8ee 100644
--- 
a/docs/snapshot/grails-data/hibernate7/api/org/grails/datastore/mapping/mongo/MongoDatastore.html
+++ 
b/docs/snapshot/grails-data/hibernate7/api/org/grails/datastore/mapping/mongo/MongoDatastore.html
@@ -151,6 +151,20 @@ implements <a 
href='../../../../../MappingContextListener.html'>MappingContextLi
                             <td class="colLast"></td>
                         </tr>
                         
+                        <tr class="altColor">
+                            <td 
class="colFirst"><code><strong>static&nbsp;java.lang.String</strong></code>&nbsp;</td>
+                            <td class="colLast"><code><a 
href="#INDEX_EXPIRE_AFTER_SECONDS">INDEX_EXPIRE_AFTER_SECONDS</a></code></td>
+                            <td class="colLast">TTL index attribute. </td>
+                        </tr>
+                        
+                        <tr class="rowColor">
+                            <td 
class="colFirst"><code><strong>static&nbsp;java.lang.String</strong></code>&nbsp;</td>
+                            <td class="colLast"><code><a 
href="#INDEX_RECREATE_ON_CONFLICT">INDEX_RECREATE_ON_CONFLICT</a></code></td>
+                            <td class="colLast">Opt-in index attribute: when 
an index already exists on the same keys with conflicting
+ options that cannot be reconciled in place (i.e. anything other than a TTL 
change), drop the
+ existing index and recreate it with the declared options instead of just 
logging the conflict.</td>
+                        </tr>
+                        
                         <tr class="altColor">
                             <td 
class="colFirst"><code><strong>static&nbsp;java.lang.String</strong></code>&nbsp;</td>
                             <td class="colLast"><code><a 
href="#SETTING_CONNECTION_STRING">SETTING_CONNECTION_STRING</a></code></td>
@@ -851,6 +865,30 @@ implements <a 
href='../../../../../MappingContextListener.html'>MappingContextLi
                             </li>
                         </ul>
                     
+                        <a name="INDEX_EXPIRE_AFTER_SECONDS"><!-- --></a>
+                        <ul class="blockListLast">
+                            <li class="blockList">
+                                
<h4>public&nbsp;static&nbsp;final&nbsp;java.lang.String 
<strong>INDEX_EXPIRE_AFTER_SECONDS</strong></h4>
+                                <p> TTL index attribute. MongoDB's 
IndexOptions#expireAfter(Long, TimeUnit)#expireAfter(Long, TimeUnit) is the only
+ way to set a TTL, but it is a two-argument setter that <a 
href='../../../../../org/grails/datastore/mapping/mongo/MongoConstants.html#mapToObject'
 title='MongoConstants.mapToObject'>MongoConstants.mapToObject</a>
+ cannot reach (that helper only invokes single-argument setters). So 
<CODE>expireAfterSeconds</CODE>
+ is pulled out of the index attributes and applied explicitly. TTL indexes are 
single-field
+ only — MongoDB silently ignores the option on a compound index.
+     </p>
+                            </li>
+                        </ul>
+                    
+                        <a name="INDEX_RECREATE_ON_CONFLICT"><!-- --></a>
+                        <ul class="blockListLast">
+                            <li class="blockList">
+                                
<h4>public&nbsp;static&nbsp;final&nbsp;java.lang.String 
<strong>INDEX_RECREATE_ON_CONFLICT</strong></h4>
+                                <p> Opt-in index attribute: when an index 
already exists on the same keys with conflicting
+ options that cannot be reconciled in place (i.e. anything other than a TTL 
change), drop the
+ existing index and recreate it with the declared options instead of just 
logging the conflict.
+     </p>
+                            </li>
+                        </ul>
+                    
                         <a name="SETTING_CONNECTION_STRING"><!-- --></a>
                         <ul class="blockListLast">
                             <li class="blockList">
diff --git a/docs/snapshot/grails-data/mongodb/api/index-all.html 
b/docs/snapshot/grails-data/mongodb/api/index-all.html
index 6f0ed7153e8..058bfe284af 100644
--- a/docs/snapshot/grails-data/mongodb/api/index-all.html
+++ b/docs/snapshot/grails-data/mongodb/api/index-all.html
@@ -6353,12 +6353,18 @@ if (location.href.indexOf('is-external=true') == -1) {
 </dt><dd> <div class="block"></div></dd>
 <dt><span class="strong"><a 
href="org/grails/orm/hibernate/cfg/ColumnConfig.html#index" title="Property in 
ColumnConfig">index</a></span> - Property in <a 
href="org/grails/orm/hibernate/cfg/ColumnConfig.html">ColumnConfig</a>
 </dt><dd> <div class="block">The index, can be either a boolean or a string 
for the name of the index</div></dd>
+<dt><span class="strong"><a 
href="org/grails/datastore/mapping/mongo/MongoDatastore.html#INDEX_EXPIRE_AFTER_SECONDS"
 title="Field in MongoDatastore">INDEX_EXPIRE_AFTER_SECONDS</a></span> - Field 
in <a 
href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">TTL index attribute. </div></dd>
 <dt><span class="strong"><a 
href="org/grails/datastore/mapping/mongo/config/MongoAttribute.html#index(java.lang.String)"
 title="Method in MongoAttribute">index(java.lang.String)</a></span> - Method 
in <a 
href="org/grails/datastore/mapping/mongo/config/MongoAttribute.html">MongoAttribute</a>
 </dt><dd> <div class="block">Configures the index type</div></dd>
 <dt><span class="strong"><a 
href="org/grails/datastore/mapping/mongo/config/MongoCollection.html#index(Map<String,
 Object>, Map<String, Object>)" title="Method in 
MongoCollection">index(Map&lt;String, Object&gt;, Map&lt;String, 
Object&gt;)</a></span> - Method in <a 
href="org/grails/datastore/mapping/mongo/config/MongoCollection.html">MongoCollection</a>
 </dt><dd> <div class="block">Defines an index</div></dd>
 <dt><span class="strong"><a 
href="org/grails/datastore/mapping/mongo/config/MongoCollection.Index.html#Index(Map<String,
 Object>, Map<String, Object>)" title="Constructor in 
MongoCollection.Index">Index(Map&lt;String, Object&gt;, Map&lt;String, 
Object&gt;)</a></span> - Constructor in <a 
href="org/grails/datastore/mapping/mongo/config/MongoCollection.Index.html">MongoCollection.Index</a>
 </dt><dd> <div class="block"></div></dd>
+<dt><span class="strong"><a 
href="org/grails/datastore/mapping/mongo/MongoDatastore.html#INDEX_RECREATE_ON_CONFLICT"
 title="Field in MongoDatastore">INDEX_RECREATE_ON_CONFLICT</a></span> - Field 
in <a 
href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">Opt-in index attribute: when an index already 
exists on the same keys with conflicting
+ options that cannot be reconciled in place (i.e. anything other than a TTL 
change), drop the
+ existing index and recreate it with the declared options instead of just 
logging the conflict.</div></dd>
 <dt><span class="strong"><a 
href="org/grails/datastore/mapping/mongo/config/MongoAttribute.html#INDEX_TYPE_2D"
 title="Field in MongoAttribute">INDEX_TYPE_2D</a></span> - Field in <a 
href="org/grails/datastore/mapping/mongo/config/MongoAttribute.html">MongoAttribute</a>
 </dt><dd> <div class="block"></div></dd>
 <dt><span class="strong"><a 
href="org/grails/datastore/mapping/mongo/config/MongoAttribute.html#INDEX_TYPE_2DSPHERE"
 title="Field in MongoAttribute">INDEX_TYPE_2DSPHERE</a></span> - Field in <a 
href="org/grails/datastore/mapping/mongo/config/MongoAttribute.html">MongoAttribute</a>
diff --git 
a/docs/snapshot/grails-data/mongodb/api/org/grails/datastore/mapping/mongo/MongoDatastore.html
 
b/docs/snapshot/grails-data/mongodb/api/org/grails/datastore/mapping/mongo/MongoDatastore.html
index 620230a4029..19ca8653198 100644
--- 
a/docs/snapshot/grails-data/mongodb/api/org/grails/datastore/mapping/mongo/MongoDatastore.html
+++ 
b/docs/snapshot/grails-data/mongodb/api/org/grails/datastore/mapping/mongo/MongoDatastore.html
@@ -151,6 +151,20 @@ implements <a 
href='../../../../../MappingContextListener.html'>MappingContextLi
                             <td class="colLast"></td>
                         </tr>
                         
+                        <tr class="altColor">
+                            <td 
class="colFirst"><code><strong>static&nbsp;java.lang.String</strong></code>&nbsp;</td>
+                            <td class="colLast"><code><a 
href="#INDEX_EXPIRE_AFTER_SECONDS">INDEX_EXPIRE_AFTER_SECONDS</a></code></td>
+                            <td class="colLast">TTL index attribute. </td>
+                        </tr>
+                        
+                        <tr class="rowColor">
+                            <td 
class="colFirst"><code><strong>static&nbsp;java.lang.String</strong></code>&nbsp;</td>
+                            <td class="colLast"><code><a 
href="#INDEX_RECREATE_ON_CONFLICT">INDEX_RECREATE_ON_CONFLICT</a></code></td>
+                            <td class="colLast">Opt-in index attribute: when 
an index already exists on the same keys with conflicting
+ options that cannot be reconciled in place (i.e. anything other than a TTL 
change), drop the
+ existing index and recreate it with the declared options instead of just 
logging the conflict.</td>
+                        </tr>
+                        
                         <tr class="altColor">
                             <td 
class="colFirst"><code><strong>static&nbsp;java.lang.String</strong></code>&nbsp;</td>
                             <td class="colLast"><code><a 
href="#SETTING_CONNECTION_STRING">SETTING_CONNECTION_STRING</a></code></td>
@@ -834,6 +848,30 @@ implements <a 
href='../../../../../MappingContextListener.html'>MappingContextLi
                             </li>
                         </ul>
                     
+                        <a name="INDEX_EXPIRE_AFTER_SECONDS"><!-- --></a>
+                        <ul class="blockListLast">
+                            <li class="blockList">
+                                
<h4>public&nbsp;static&nbsp;final&nbsp;java.lang.String 
<strong>INDEX_EXPIRE_AFTER_SECONDS</strong></h4>
+                                <p> TTL index attribute. MongoDB's 
com.mongodb.client.model.IndexOptions#expireAfter(java.lang.Long, 
java.util.concurrent.TimeUnit) is the only
+ way to set a TTL, but it is a two-argument setter that <a 
href='../../../../../org/grails/datastore/mapping/mongo/MongoConstants.html#mapToObject'
 title='MongoConstants.mapToObject'>MongoConstants.mapToObject</a>
+ cannot reach (that helper only invokes single-argument setters). So 
<CODE>expireAfterSeconds</CODE>
+ is pulled out of the index attributes and applied explicitly. TTL indexes are 
single-field
+ only — MongoDB silently ignores the option on a compound index.
+     </p>
+                            </li>
+                        </ul>
+                    
+                        <a name="INDEX_RECREATE_ON_CONFLICT"><!-- --></a>
+                        <ul class="blockListLast">
+                            <li class="blockList">
+                                
<h4>public&nbsp;static&nbsp;final&nbsp;java.lang.String 
<strong>INDEX_RECREATE_ON_CONFLICT</strong></h4>
+                                <p> Opt-in index attribute: when an index 
already exists on the same keys with conflicting
+ options that cannot be reconciled in place (i.e. anything other than a TTL 
change), drop the
+ existing index and recreate it with the declared options instead of just 
logging the conflict.
+     </p>
+                            </li>
+                        </ul>
+                    
                         <a name="SETTING_CONNECTION_STRING"><!-- --></a>
                         <ul class="blockListLast">
                             <li class="blockList">
diff --git a/docs/snapshot/grails-data/mongodb/manual/index.html 
b/docs/snapshot/grails-data/mongodb/manual/index.html
index 202148ef1d5..81da6ff955b 100644
--- a/docs/snapshot/grails-data/mongodb/manual/index.html
+++ b/docs/snapshot/grails-data/mongodb/manual/index.html
@@ -706,6 +706,22 @@ table.CodeRay td.code{padding:0 0 0 .75em}
 <p>Below are the details of the changes across releases:</p>
 </div>
 <div class="sect3">
+<h4 id="_8_0">8.0</h4>
+<div class="ulist">
+<ul>
+<li>
+<p>TTL indexes via <code>indexAttributes: [expireAfterSeconds: N]</code> in 
the mapping DSL</p>
+</li>
+<li>
+<p>Text and other special indexes via <code>indexAttributes: [type: 
'text']</code></p>
+</li>
+<li>
+<p>In-place reconciliation of changed index options, with opt-in 
<code>indexAttributes: [recreateOnConflict: true]</code></p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect3">
 <h4 id="_7_1">7.1</h4>
 <div class="ulist">
 <ul>
@@ -1794,6 +1810,81 @@ dirty checking and prevent the property from being 
updated.</p>
 </div>
 </div>
 <div class="sect3">
+<h4 id="_ttl_indexes">TTL Indexes</h4>
+<div class="paragraph">
+<p>MongoDB can automatically remove documents from a collection once they 
reach a certain age using a <a 
href="https://www.mongodb.com/docs/manual/core/index-ttl/";>TTL index</a>. 
Declare one by adding <code>expireAfterSeconds</code> to the 
<code>indexAttributes</code> of a single date-valued property:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="groovy"><span 
class="type">class</span> <span class="class">LoginEvent</span> {
+    <span class="predefined-type">Date</span> dateCreated
+    <span class="directive">static</span> mapping = {
+        dateCreated <span class="key">index</span>:<span 
class="predefined-constant">true</span>, <span 
class="key">indexAttributes</span>: [<span 
class="key">expireAfterSeconds</span>: <span class="integer">3600</span>]
+    }
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>With the mapping above MongoDB expires each <code>LoginEvent</code> roughly 
one hour (3600 seconds) after the value stored in its <code>dateCreated</code> 
property. The indexed property must hold a <code>Date</code> (or an array of 
dates), and TTL is supported on single-field indexes only — MongoDB ignores 
<code>expireAfterSeconds</code> if it is applied to a 
<code>compoundIndex</code>.</p>
+</div>
+<div class="paragraph">
+<p>If you later change the declared <code>expireAfterSeconds</code>, GORM 
reconciles the existing index in place on startup (using MongoDB&#8217;s <a 
href="https://www.mongodb.com/docs/manual/reference/command/collMod/";>collMod</a>
 command) so that the new expiry takes effect without dropping or rebuilding 
the index.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_text_indexes">Text Indexes</h4>
+<div class="paragraph">
+<p>In addition to declaring a text index with the <code>index</code> method 
(see <a href="#textSearch">Full Text Search</a>), you can declare one on a 
single property through <code>indexAttributes</code> using <code>type: 
'text'</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="groovy"><span 
class="type">class</span> <span class="class">Product</span> {
+    <span class="predefined-type">String</span> title
+    <span class="directive">static</span> mapping = {
+        title <span class="key">index</span>:<span 
class="predefined-constant">true</span>, <span 
class="key">indexAttributes</span>: [<span class="key">type</span>: <span 
class="string"><span class="delimiter">'</span><span 
class="content">text</span><span class="delimiter">'</span></span>]
+    }
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>type</code> attribute sets the index type for that field, so it 
can equally be used to declare other special index types such as 
<code>'2d'</code> or <code>'2dsphere'</code>. Note that MongoDB allows at most 
one text index per collection. See <a href="#textSearch">Full Text Search</a> 
for how to query a text index once it has been created.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_reconciling_index_option_changes">Reconciling Index Option 
Changes</h4>
+<div class="paragraph">
+<p>An index is created from its declared options the first time the collection 
is initialised. If you later change the options of an already-created index — 
for example marking it <code>unique</code> — MongoDB cannot alter most options 
in place and reports an <code>IndexOptionsConflict</code>. By default GORM logs 
this conflict and leaves the existing index untouched.</p>
+</div>
+<div class="paragraph">
+<p>To have GORM drop the existing index and recreate it with the newly 
declared options, add <code>recreateOnConflict: true</code> to the 
<code>indexAttributes</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="groovy"><span 
class="type">class</span> <span class="class">Person</span> {
+    <span class="predefined-type">String</span> name
+    <span class="directive">static</span> mapping = {
+        name <span class="key">index</span>:<span 
class="predefined-constant">true</span>, <span 
class="key">indexAttributes</span>: [<span class="key">unique</span>:<span 
class="predefined-constant">true</span>, <span 
class="key">recreateOnConflict</span>:<span 
class="predefined-constant">true</span>]
+    }
+}</code></pre>
+</div>
+</div>
+<div class="admonitionblock warning">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-warning" title="Warning"></i>
+</td>
+<td class="content">
+Dropping and recreating an index rebuilds it from scratch, during which 
queries that rely on the index are not served by it. Enable 
<code>recreateOnConflict</code> deliberately, and prefer applying it during a 
maintenance window for large collections.
+</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>A change to a TTL index&#8217;s <code>expireAfterSeconds</code> is handled 
automatically and does not require <code>recreateOnConflict</code>, because 
GORM updates the expiry in place rather than rebuilding the index.</p>
+</div>
+</div>
+<div class="sect3">
 <h4 id="_indexing_using_the_index_method">Indexing using the <em>index</em> 
method</h4>
 <div class="paragraph">
 <p>In addition to the convenience features described above you can use the 
<code>index</code> method to define any index you want. For example:</p>
diff --git 
a/docs/snapshot/grails-data/mongodb/manual/introduction/releaseNotes.html 
b/docs/snapshot/grails-data/mongodb/manual/introduction/releaseNotes.html
index 4a450bf6ced..f0a97d849e6 100644
--- a/docs/snapshot/grails-data/mongodb/manual/introduction/releaseNotes.html
+++ b/docs/snapshot/grails-data/mongodb/manual/introduction/releaseNotes.html
@@ -453,6 +453,22 @@ body.book #toc,body.book #preamble,body.book 
h1.sect0,body.book .sect1>h2{page-b
 <p>Below are the details of the changes across releases:</p>
 </div>
 <div class="sect3">
+<h4 id="_8_0">8.0</h4>
+<div class="ulist">
+<ul>
+<li>
+<p>TTL indexes via <code>indexAttributes: [expireAfterSeconds: N]</code> in 
the mapping DSL</p>
+</li>
+<li>
+<p>Text and other special indexes via <code>indexAttributes: [type: 
'text']</code></p>
+</li>
+<li>
+<p>In-place reconciliation of changed index options, with opt-in 
<code>indexAttributes: [recreateOnConflict: true]</code></p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect3">
 <h4 id="_7_1">7.1</h4>
 <div class="ulist">
 <ul>
diff --git 
a/docs/snapshot/grails-data/mongodb/manual/querying/queryIndexes.html 
b/docs/snapshot/grails-data/mongodb/manual/querying/queryIndexes.html
index 4ecba38406a..0287b9e456a 100644
--- a/docs/snapshot/grails-data/mongodb/manual/querying/queryIndexes.html
+++ b/docs/snapshot/grails-data/mongodb/manual/querying/queryIndexes.html
@@ -519,6 +519,81 @@ body.book #toc,body.book #preamble,body.book 
h1.sect0,body.book .sect1>h2{page-b
 </div>
 </div>
 <div class="sect3">
+<h4 id="_ttl_indexes">TTL Indexes</h4>
+<div class="paragraph">
+<p>MongoDB can automatically remove documents from a collection once they 
reach a certain age using a <a 
href="https://www.mongodb.com/docs/manual/core/index-ttl/";>TTL index</a>. 
Declare one by adding <code>expireAfterSeconds</code> to the 
<code>indexAttributes</code> of a single date-valued property:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-groovy" data-lang="groovy">class 
LoginEvent {
+    Date dateCreated
+    static mapping = {
+        dateCreated index:true, indexAttributes: [expireAfterSeconds: 3600]
+    }
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>With the mapping above MongoDB expires each <code>LoginEvent</code> roughly 
one hour (3600 seconds) after the value stored in its <code>dateCreated</code> 
property. The indexed property must hold a <code>Date</code> (or an array of 
dates), and TTL is supported on single-field indexes only — MongoDB ignores 
<code>expireAfterSeconds</code> if it is applied to a 
<code>compoundIndex</code>.</p>
+</div>
+<div class="paragraph">
+<p>If you later change the declared <code>expireAfterSeconds</code>, GORM 
reconciles the existing index in place on startup (using MongoDB&#8217;s <a 
href="https://www.mongodb.com/docs/manual/reference/command/collMod/";>collMod</a>
 command) so that the new expiry takes effect without dropping or rebuilding 
the index.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_text_indexes">Text Indexes</h4>
+<div class="paragraph">
+<p>In addition to declaring a text index with the <code>index</code> method 
(see <a href="#textSearch">[textSearch]</a>), you can declare one on a single 
property through <code>indexAttributes</code> using <code>type: 
'text'</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-groovy" data-lang="groovy">class 
Product {
+    String title
+    static mapping = {
+        title index:true, indexAttributes: [type: 'text']
+    }
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>type</code> attribute sets the index type for that field, so it 
can equally be used to declare other special index types such as 
<code>'2d'</code> or <code>'2dsphere'</code>. Note that MongoDB allows at most 
one text index per collection. See <a href="#textSearch">[textSearch]</a> for 
how to query a text index once it has been created.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_reconciling_index_option_changes">Reconciling Index Option 
Changes</h4>
+<div class="paragraph">
+<p>An index is created from its declared options the first time the collection 
is initialised. If you later change the options of an already-created index — 
for example marking it <code>unique</code> — MongoDB cannot alter most options 
in place and reports an <code>IndexOptionsConflict</code>. By default GORM logs 
this conflict and leaves the existing index untouched.</p>
+</div>
+<div class="paragraph">
+<p>To have GORM drop the existing index and recreate it with the newly 
declared options, add <code>recreateOnConflict: true</code> to the 
<code>indexAttributes</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-groovy" data-lang="groovy">class 
Person {
+    String name
+    static mapping = {
+        name index:true, indexAttributes: [unique:true, 
recreateOnConflict:true]
+    }
+}</code></pre>
+</div>
+</div>
+<div class="admonitionblock warning">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-warning" title="Warning"></i>
+</td>
+<td class="content">
+Dropping and recreating an index rebuilds it from scratch, during which 
queries that rely on the index are not served by it. Enable 
<code>recreateOnConflict</code> deliberately, and prefer applying it during a 
maintenance window for large collections.
+</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>A change to a TTL index&#8217;s <code>expireAfterSeconds</code> is handled 
automatically and does not require <code>recreateOnConflict</code>, because 
GORM updates the expiry in place rather than rebuilding the index.</p>
+</div>
+</div>
+<div class="sect3">
 <h4 id="_indexing_using_the_index_method">Indexing using the <em>index</em> 
method</h4>
 <div class="paragraph">
 <p>In addition to the convenience features described above you can use the 
<code>index</code> method to define any index you want. For example:</p>
diff --git a/docs/snapshot/guide/introduction.html 
b/docs/snapshot/guide/introduction.html
index b78a6cb4866..62e8193bdac 100644
--- a/docs/snapshot/guide/introduction.html
+++ b/docs/snapshot/guide/introduction.html
@@ -357,6 +357,33 @@ request bodies. The helper URL-encodes form fields using 
UTF-8, and repeated val
 repeated keys in insertion order.</p>
 </div>
 </div>
+<div class="sect3">
+<h4 id="_gorm_for_mongodb_ttl_text_and_reconciled_indexes">GORM for MongoDB: 
TTL, Text, and Reconciled Indexes</h4>
+<div class="paragraph">
+<p>GORM for MongoDB can now declare a <a 
href="https://www.mongodb.com/docs/manual/core/index-ttl/";>TTL index</a> 
directly in the mapping DSL.
+Adding <code>expireAfterSeconds</code> to the <code>indexAttributes</code> of 
a single date-valued property creates a TTL index, and MongoDB
+automatically removes each document once it reaches the configured age:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="groovy"><span 
class="type">class</span> <span class="class">LoginEvent</span> {
+    <span class="predefined-type">Date</span> dateCreated
+    <span class="directive">static</span> mapping = {
+        dateCreated <span class="key">index</span>: <span 
class="predefined-constant">true</span>, <span 
class="key">indexAttributes</span>: [<span 
class="key">expireAfterSeconds</span>: <span class="integer">3600</span>]
+    }
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>A single property can likewise declare a <code>$text</code> index — or 
another special type such as <code>2dsphere</code> — through
+<code>indexAttributes: [type: 'text']</code>.</p>
+</div>
+<div class="paragraph">
+<p>When the options of an already-created index change between restarts, GORM 
now reconciles the difference instead of only
+logging a conflict. A changed TTL is applied in place with MongoDB&#8217;s 
<code>collMod</code> command — no drop, no rebuild — while any
+other option change is applied by declaring <code>indexAttributes: 
[recreateOnConflict: true]</code>.</p>
+</div>
+</div>
 </div>
 
 
diff --git a/docs/snapshot/guide/single.html b/docs/snapshot/guide/single.html
index 9dd4b87ae01..f5c76faea39 100644
--- a/docs/snapshot/guide/single.html
+++ b/docs/snapshot/guide/single.html
@@ -920,6 +920,33 @@ request bodies. The helper URL-encodes form fields using 
UTF-8, and repeated val
 repeated keys in insertion order.</p>
 </div>
 </div>
+<div class="sect3">
+<h4 id="_gorm_for_mongodb_ttl_text_and_reconciled_indexes">GORM for MongoDB: 
TTL, Text, and Reconciled Indexes</h4>
+<div class="paragraph">
+<p>GORM for MongoDB can now declare a <a 
href="https://www.mongodb.com/docs/manual/core/index-ttl/";>TTL index</a> 
directly in the mapping DSL.
+Adding <code>expireAfterSeconds</code> to the <code>indexAttributes</code> of 
a single date-valued property creates a TTL index, and MongoDB
+automatically removes each document once it reaches the configured age:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="groovy"><span 
class="type">class</span> <span class="class">LoginEvent</span> {
+    <span class="predefined-type">Date</span> dateCreated
+    <span class="directive">static</span> mapping = {
+        dateCreated <span class="key">index</span>: <span 
class="predefined-constant">true</span>, <span 
class="key">indexAttributes</span>: [<span 
class="key">expireAfterSeconds</span>: <span class="integer">3600</span>]
+    }
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>A single property can likewise declare a <code>$text</code> index — or 
another special type such as <code>2dsphere</code> — through
+<code>indexAttributes: [type: 'text']</code>.</p>
+</div>
+<div class="paragraph">
+<p>When the options of an already-created index change between restarts, GORM 
now reconciles the difference instead of only
+logging a conflict. A changed TTL is applied in place with MongoDB&#8217;s 
<code>collMod</code> command — no drop, no rebuild — while any
+other option change is applied by declaring <code>indexAttributes: 
[recreateOnConflict: true]</code>.</p>
+</div>
+</div>
 </div>
 
 

Reply via email to