You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by as...@apache.org on 2026/10/04 15:01:16 UTC
(grails-website) branch asf-site-production updated: Deploying to documentation branch - 15:00:57
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 ee793ab01794 Deploying to documentation branch - 15:00:57
ee793ab01794 is described below
commit ee793ab01794c9c91e57a7ec3241354be248219e
Author: jdaugherty <jd...@users.noreply.github.com>
AuthorDate: Sun Oct 4 15:01:00 2026 +0000
Deploying to documentation branch - 15:00:57
---
docs/snapshot/api/allclasses-frame.html | 3 +
docs/snapshot/api/index-all.html | 17 ++
.../datastore/mapping/mongo/IndexBuildResult.html | 241 +++++++++++++++++++++
.../datastore/mapping/mongo/MissingIndex.html | 238 ++++++++++++++++++++
.../datastore/mapping/mongo/MongoDatastore.html | 234 +++++++++++++++-----
.../datastore/mapping/mongo/UndeclaredIndex.html | 238 ++++++++++++++++++++
.../developer-manual/gettingStarted.html | 2 +-
.../grails-data/developer-manual/introduction.html | 2 +-
.../grails-data/developer-manual/stepByStep.html | 2 +-
.../grails-data/developer-manual/testing.html | 2 +-
.../developer-manual/understandingApi.html | 2 +-
.../understandingApi/datastoreBasics.html | 2 +-
.../understandingApi/gormApis.html | 2 +-
.../understandingApi/gormEnhancer.html | 2 +-
.../understandingApi/implementingCrud.html | 2 +-
.../understandingApi/implementingQueries.html | 2 +-
.../understandingApi/secondaryIndexes.html | 2 +-
.../hibernate5/api/allclasses-frame.html | 3 +
.../grails-data/hibernate5/api/index-all.html | 17 ++
.../datastore/mapping/mongo/IndexBuildResult.html | 240 ++++++++++++++++++++
.../datastore/mapping/mongo/MissingIndex.html | 237 ++++++++++++++++++++
.../datastore/mapping/mongo/MongoDatastore.html | 234 +++++++++++++++-----
.../datastore/mapping/mongo/UndeclaredIndex.html | 237 ++++++++++++++++++++
.../hibernate7/api/allclasses-frame.html | 3 +
.../grails-data/hibernate7/api/index-all.html | 17 ++
.../datastore/mapping/mongo/IndexBuildResult.html | 240 ++++++++++++++++++++
.../datastore/mapping/mongo/MissingIndex.html | 237 ++++++++++++++++++++
.../datastore/mapping/mongo/MongoDatastore.html | 234 +++++++++++++++-----
.../datastore/mapping/mongo/UndeclaredIndex.html | 237 ++++++++++++++++++++
.../grails-data/mongodb/api/allclasses-frame.html | 3 +
.../grails-data/mongodb/api/index-all.html | 17 ++
.../datastore/mapping/mongo/IndexBuildResult.html | 241 +++++++++++++++++++++
.../datastore/mapping/mongo/MissingIndex.html | 238 ++++++++++++++++++++
.../datastore/mapping/mongo/MongoDatastore.html | 234 +++++++++++++++-----
.../datastore/mapping/mongo/UndeclaredIndex.html | 238 ++++++++++++++++++++
.../snapshot/grails-data/mongodb/manual/index.html | 161 +++++++++++++-
.../mongodb/manual/introduction/releaseNotes.html | 24 ++
.../mongodb/manual/introduction/upgradeNotes.html | 15 ++
.../mongodb/manual/querying/queryIndexes.html | 122 ++++++++++-
.../grails-data/whats-new-manual/index.html | 2 +-
docs/snapshot/guide/introduction.html | 9 +
docs/snapshot/guide/single.html | 17 ++
docs/snapshot/guide/upgrading.html | 8 +
43 files changed, 4026 insertions(+), 232 deletions(-)
diff --git a/docs/snapshot/api/allclasses-frame.html b/docs/snapshot/api/allclasses-frame.html
index 5b2eadd529ad..4cfe7a400550 100644
--- a/docs/snapshot/api/allclasses-frame.html
+++ b/docs/snapshot/api/allclasses-frame.html
@@ -2032,6 +2032,7 @@
<li><a href="org/grails/web/util/IncludedContent.html" title="class in org.grails.web.util" target="classFrame">IncludedContent</a></li>
<li><a href="org/apache/grails/core/plugins/filters/IncludingPluginFilter.html" title="class in org.apache.grails.core.plugins.filters" target="classFrame">IncludingPluginFilter</a></li>
<li><a href="org/grails/orm/hibernate/cfg/domainbinding/binder/IndexBinder.html" title="class in org.grails.orm.hibernate.cfg.domainbinding.binder" target="classFrame">IndexBinder</a></li>
+<li><a href="org/grails/datastore/mapping/mongo/IndexBuildResult.html" title="record in org.grails.datastore.mapping.mongo" target="classFrame">IndexBuildResult</a></li>
<li><a href="org/grails/databinding/IndexedPropertyReferenceDescriptor.html" title="class in org.grails.databinding" target="classFrame">IndexedPropertyReferenceDescriptor</a></li>
<li><a href="org/apache/grails/data/testing/tck/tests/InheritanceSpec.html" title="class in org.apache.grails.data.testing.tck.tests" target="classFrame">InheritanceSpec</a></li>
<li><a href="org/grails/datastore/mapping/model/lifecycle/Initializable.html" title="interface in org.grails.datastore.mapping.model.lifecycle" target="classFrame"><I>Initializable</I></a></li>
@@ -2418,6 +2419,7 @@
<li><a href="grails/web/mime/MimeUtility.html" title="interface in grails.web.mime" target="classFrame"><I>MimeUtility</I></a></li>
<li><a href="org/grails/datastore/gorm/validation/constraints/MinConstraint.html" title="class in org.grails.datastore.gorm.validation.constraints" target="classFrame">MinConstraint</a></li>
<li><a href="org/grails/datastore/gorm/validation/constraints/MinSizeConstraint.html" title="class in org.grails.datastore.gorm.validation.constraints" target="classFrame">MinSizeConstraint</a></li>
+<li><a href="org/grails/datastore/mapping/mongo/MissingIndex.html" title="record in org.grails.datastore.mapping.mongo" target="classFrame">MissingIndex</a></li>
<li><a href="org/grails/cli/profile/steps/MkdirStep.html" title="class in org.grails.cli.profile.steps" target="classFrame">MkdirStep</a></li>
<li><a href="org/grails/plugins/testing/MockAsyncContext.html" title="class in org.grails.plugins.testing" target="classFrame">MockAsyncContext</a></li>
<li><a href="org/grails/testing/gorm/MockCascadingDomainClassValidator.html" title="class in org.grails.testing.gorm" target="classFrame">MockCascadingDomainClassValidator</a></li>
@@ -3585,6 +3587,7 @@
<li><a href="org/grails/gorm/graphql/types/scalars/coercing/UUIDCoercion.html" title="class in org.grails.gorm.graphql.types.scalars.coercing" target="classFrame">UUIDCoercion</a></li>
<li><a href="org/grails/databinding/converters/UUIDConverter.html" title="class in org.grails.databinding.converters" target="classFrame">UUIDConverter</a></li>
<li><a href="grails/plugin/springsecurity/rest/token/generation/UUIDTokenGenerator.html" title="class in grails.plugin.springsecurity.rest.token.generation" target="classFrame">UUIDTokenGenerator</a></li>
+<li><a href="org/grails/datastore/mapping/mongo/UndeclaredIndex.html" title="record in org.grails.datastore.mapping.mongo" target="classFrame">UndeclaredIndex</a></li>
<li><a href="org/apache/grails/undertow/core/UndertowBuilderCustomizer.html" title="interface in org.apache.grails.undertow.core" target="classFrame"><I>UndertowBuilderCustomizer</I></a></li>
<li><a href="org/apache/grails/undertow/core/servlet/UndertowDeploymentInfoCustomizer.html" title="interface in org.apache.grails.undertow.core.servlet" target="classFrame"><I>UndertowDeploymentInfoCustomizer</I></a></li>
<li><a href="org/apache/grails/undertow/plugin/UndertowGrailsPlugin.html" title="class in org.apache.grails.undertow.plugin" target="classFrame">UndertowGrailsPlugin</a></li>
diff --git a/docs/snapshot/api/index-all.html b/docs/snapshot/api/index-all.html
index b833b8e3f83f..401d96659195 100644
--- a/docs/snapshot/api/index-all.html
+++ b/docs/snapshot/api/index-all.html
@@ -5057,6 +5057,9 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block">Creates and reconciles the indexes declared by the domain classes mapped to this datastore's connection.</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/neo4j/connections/Neo4jConnectionSourceSettings.html#buildIndex" title="Property in Neo4jConnectionSourceSettings">buildIndex</a></span> - Property in <a href="org/grails/datastore/gorm/neo4j/connections/Neo4jConnectionSourceSettings.html">Neo4jConnectionSourceSettings</a>
</dt><dd> <div class="block">Whether to build the Neo4j index</div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/MongoDatastore.html#buildIndexAsync()" title="Method in MongoDatastore">buildIndexAsync()</a></span> - Method in <a href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">Runs the same build as <a href='#buildIndex()'>buildIndex()</a> on this connection's background index build thread, whatever
+ <CODE>grails.mongodb.buildIndexesAsync</CODE> says, and returns at once with a handle on its outcome.</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/connections/AbstractMongoConnectionSourceSettings.html#buildIndexes" title="Property in AbstractMongoConnectionSourceSettings">buildIndexes</a></span> - Property in <a href="org/grails/datastore/mapping/mongo/connections/AbstractMongoConnectionSourceSettings.html">AbstractMongoConnectionSourceSettings</a>
</dt><dd> <div class="block">Whether GORM creates and reconciles the indexes declared in domain class mapping blocks by
itself when the datastore starts. </div></dd>
@@ -14697,6 +14700,8 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block">Whether to drop existing data</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/mongo/extensions/MongoExtensions.html#dropIndex(MongoCollection<Document>, Map<String, Object>, com.mongodb.client.model.DropIndexOptions)" title="Method in MongoExtensions">dropIndex(MongoCollection<Document>, Map<String, Object>, com.mongodb.client.model.DropIndexOptions)</a></span> - Method in <a href="org/grails/datastore/gorm/mongo/extensions/MongoExtensions.html">MongoExtensions</a>
</dt><dd> <div class="block"></div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/MongoDatastore.html#dropUndeclaredIndexes(List<UndeclaredIndex>)" title="Method in MongoDatastore">dropUndeclaredIndexes(List<UndeclaredIndex>)</a></span> - Method in <a href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">Drops the given indexes: those <a href='#findUndeclaredIndexes()'>findUndeclaredIndexes()</a> reported, once they have been reviewed.</div></dd>
<dt><span class="strong"><a href="org/grails/openapi/DocumentCompletion.html#dropUnresolvedReferences(io.swagger.v3.oas.models.Paths, io.swagger.v3.oas.models.Components)" title="Method in DocumentCompletion">dropUnresolvedReferences(io.swagger.v3.oas.models.Paths, io.swagger.v3.oas.models.Components)</a></span> - Method in <a href="org/grails/openapi/DocumentCompletion.html">DocumentCompletion</a>
</dt><dd> <div class="block">Removes a reference to a schema that is not in the document. </div></dd>
<dt><span class="strong"><a href="grails/plugin/springsecurity/web/access/GrailsWebInvocationPrivilegeEvaluator.html#DUMMY_CHAIN" title="Field in GrailsWebInvocationPrivilegeEvaluator">DUMMY_CHAIN</a></span> - Field in <a href="grails/plugin/springsecurity/web/access/GrailsWebInvocationPrivilegeEvaluator.html">GrailsWebInvocationPrivilegeEvaluator</a>
@@ -17527,6 +17532,9 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/services/implementers/FindOneImplementer.html#findMethodToInvoke(org.codehaus.groovy.ast.ClassNode, org.codehaus.groovy.ast.MethodNode)" title="Method in FindOneImplementer">findMethodToInvoke(org.codehaus.groovy.ast.ClassNode, org.codehaus.groovy.ast.MethodNode)</a></span> - Method in <a href="org/grails/datastore/gorm/services/implementers/FindOneImplementer.html">FindOneImplementer</a>
</dt><dd> <div class="block"></div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/MongoDatastore.html#findMissingIndexes()" title="Method in MongoDatastore">findMissingIndexes()</a></span> - Method in <a href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">Lists the indexes the domain classes declare that their collections do not have, on the collections
+ whose declared indexes <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/mongo/extensions/MongoExtensions.html#findOne(MongoCollection<Document>, Map<String, Object>, Map<String, Object>, Map<String, Object>, com.mongodb.ReadPreference)" title="Method in MongoExtensions">findOne(MongoCollection<Document>, Map<String, Object>, Map<String, Object>, Map<String, Object>, com.mongodb.ReadPreference)</a></span> - Method in <a href="org/grails/datastore/gorm/mongo/extensions/MongoExt [...]
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/AbstractMongoSession.html#findOneAndDelete(com.mongodb.client.MongoCollection<T>, org.bson.conversions.Bson, com.mongodb.client.model.FindOneAndDeleteOptions)" title="Method in AbstractMongoSession">findOneAndDelete(com.mongodb.client.MongoCollection<T>, org.bson.conversions.Bson, com.mongodb.client.model.FindOneAndDeleteOptions)</a></span> - Method in <a href="org/grails/datastore/mapping/mongo/AbstractMongoSessi [...]
@@ -17828,6 +17836,9 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/jdbc/DataSourceBuilder.html#findType()" title="Method in DataSourceBuilder">findType()</a></span> - Method in <a href="org/grails/datastore/gorm/jdbc/DataSourceBuilder.html">DataSourceBuilder</a>
</dt><dd> <div class="block"></div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/MongoDatastore.html#findUndeclaredIndexes()" title="Method in MongoDatastore">findUndeclaredIndexes()</a></span> - Method in <a href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">Lists the indexes that no domain class declares, on the collections whose declared indexes
+ <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.</div></dd>
<dt><span class="strong"><a href="grails/boot/GrailsBanner.html#findUndertowVersion()" title="Method in GrailsBanner">findUndertowVersion()</a></span> - Method in <a href="grails/boot/GrailsBanner.html">GrailsBanner</a>
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="grails/views/GenericViewConfiguration.html#findUniquePackages(grails.core.GrailsClass)" title="Method in GenericViewConfiguration">findUniquePackages(grails.core.GrailsClass)</a></span> - Method in <a href="grails/views/GenericViewConfiguration.html">GenericViewConfiguration</a>
@@ -32773,6 +32784,8 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block">Configures the index attributes</div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/cfg/domainbinding/binder/IndexBinder.html" title="Class in org.grails.orm.hibernate.cfg.domainbinding.binder">IndexBinder</a></span> - Class in <a href="./org/grails/orm/hibernate/cfg/domainbinding/binder/package-summary.html">org.grails.orm.hibernate.cfg.domainbinding.binder</a>
</dt><dd><div class="block"></div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/IndexBuildResult.html" title="Record in org.grails.datastore.mapping.mongo">IndexBuildResult</a></span> - Record in <a href="./org/grails/datastore/mapping/mongo/package-summary.html">org.grails.datastore.mapping.mongo</a>
+</dt><dd><div class="block">What an index build applied, as its summary line reports it. </div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/cfg/PropertyConfig.html#indexColumn" title="Property in PropertyConfig">indexColumn</a></span> - Property in <a href="org/grails/orm/hibernate/cfg/PropertyConfig.html">PropertyConfig</a>
</dt><dd> <div class="block">The column used to produce the index for index based collections (lists and maps)</div></dd>
<dt><span class="strong"><a href="grails/databinding/SimpleDataBinder.html#INDEXED_PROPERTY_REGEX" title="Property in SimpleDataBinder">INDEXED_PROPERTY_REGEX</a></span> - Property in <a href="grails/databinding/SimpleDataBinder.html">SimpleDataBinder</a>
@@ -40340,6 +40353,8 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/grails/compiler/injection/GrailsASTUtils.html#MISSING_METHOD_EXCEPTION" title="Field in GrailsASTUtils">MISSING_METHOD_EXCEPTION</a></span> - Field in <a href="org/grails/compiler/injection/GrailsASTUtils.html">GrailsASTUtils</a>
</dt><dd> <div class="block"></div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/MissingIndex.html" title="Record in org.grails.datastore.mapping.mongo">MissingIndex</a></span> - Record in <a href="./org/grails/datastore/mapping/mongo/package-summary.html">org.grails.datastore.mapping.mongo</a>
+</dt><dd><div class="block">An index a domain class declares that its collection does not have.</div></dd>
<dt><span class="strong"><a href="grails/web/databinding/GrailsWebDataBinder.html#missingNoArgConstructorMessage(Class<?>)" title="Method in GrailsWebDataBinder">missingNoArgConstructorMessage(Class<?>)</a></span> - Method in <a href="grails/web/databinding/GrailsWebDataBinder.html">GrailsWebDataBinder</a>
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/apache/grails/common/compiler/GroovyTransformOrder.html#MIXIN_ORDER" title="Field in GroovyTransformOrder">MIXIN_ORDER</a></span> - Field in <a href="org/apache/grails/common/compiler/GroovyTransformOrder.html">GroovyTransformOrder</a>
@@ -58319,6 +58334,8 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block">Unbinds and closes a session. </div></dd>
<dt><span class="strong"><a href="org/grails/buffer/GrailsRoutablePrintWriter.html#unBlockFlushAndClose()" title="Method in GrailsRoutablePrintWriter">unBlockFlushAndClose()</a></span> - Method in <a href="org/grails/buffer/GrailsRoutablePrintWriter.html">GrailsRoutablePrintWriter</a>
</dt><dd> <div class="block"></div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/UndeclaredIndex.html" title="Record in org.grails.datastore.mapping.mongo">UndeclaredIndex</a></span> - Record in <a href="./org/grails/datastore/mapping/mongo/package-summary.html">org.grails.datastore.mapping.mongo</a>
+</dt><dd><div class="block">An index on a collection that domain classes map, whose keys none of those domain classes declares.</div></dd>
<dt><span class="strong"><a href="org/grails/encoder/EncodingStateImpl.html#UNDEFINED_ENCODING_STATE" title="Field in EncodingStateImpl">UNDEFINED_ENCODING_STATE</a></span> - Field in <a href="org/grails/encoder/EncodingStateImpl.html">EncodingStateImpl</a>
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/grails/plugins/BinaryGrailsPlugin.html#UNDERSCORE" title="Field in BinaryGrailsPlugin">UNDERSCORE</a></span> - Field in <a href="org/grails/plugins/BinaryGrailsPlugin.html">BinaryGrailsPlugin</a>
diff --git a/docs/snapshot/api/org/grails/datastore/mapping/mongo/IndexBuildResult.html b/docs/snapshot/api/org/grails/datastore/mapping/mongo/IndexBuildResult.html
new file mode 100644
index 000000000000..3cba335b63ad
--- /dev/null
+++ b/docs/snapshot/api/org/grails/datastore/mapping/mongo/IndexBuildResult.html
@@ -0,0 +1,241 @@
+<!--
+
+ 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.
+
+-->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!-- **************************************************************** -->
+<!-- * PLEASE KEEP COMPLICATED EXPRESSIONS OUT OF THESE TEMPLATES, * -->
+<!-- * i.e. only iterate & print data where possible. Thanks, Jez. * -->
+<!-- **************************************************************** -->
+
+<html>
+<head>
+ <!-- Generated by groovydoc (5.1.3) -->
+ <title>IndexBuildResult (Grails 8.0.0-SNAPSHOT)</title>
+
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="icon">
+ <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
+
+<body class="center">
+<script type="text/javascript"><!--
+if (location.href.indexOf('is-external=true') == -1) {
+ parent.document.title="IndexBuildResult (Grails 8.0.0-SNAPSHOT)";
+}
+//-->
+</script>
+<noscript>
+ <div>JavaScript is disabled on your browser.</div>
+</noscript>
+<!-- ========= START OF TOP NAVBAR ======= -->
+<div class="topNav"><a name="navbar_top">
+ <!-- -->
+</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/IndexBuildResult" target="_top">Frames</a></li>
+ <li><a href="IndexBuildResult.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <a name="skip-navbar_top">
+ <!-- -->
+ </a></div>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<!-- ======== START OF CLASS DATA ======== -->
+<div class="header">
+
+ <div class="subTitle">Package: <strong>org.grails.datastore.mapping.mongo</strong></div>
+
+ <h2 title="[Java] Record IndexBuildResult" class="title">[Java] Record IndexBuildResult</h2>
+</div>
+<div class="contentContainer">
+<ul class="inheritance">
+<li><ul class="inheritance"></ul></li><li><ul class="inheritance"></ul></li><li>org.grails.datastore.mapping.mongo.IndexBuildResult
+</ul>
+<div class="description">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+ <!-- todo: direct known subclasses -->
+ <hr>
+
+<pre>public record IndexBuildResult
+extends java.lang.Record</pre>
+
+ <p> What an index build applied, as its summary line reports it. The counts are of index declarations, so
+ declaring the same keys twice can count one created and one already present.
+ <DL><DT><B>Parameters:</B></DT><DD><code>database</code> - the database the build was for</DD><DD><code>domainClasses</code> - the domain classes considered, including those that declare no indexes</DD><DD><code>created</code> - declarations whose index did not exist before the build</DD><DD><code>recreated</code> - indexes dropped and built again for <CODE>recreateOnConflict</CODE></DD><DD><code>alreadyPresent</code> - declarations whose index already existed, [...]
+ in place</DD><DD><code>unclassified</code> - declarations applied on a collection whose existing indexes could not be listed, so
+ neither created nor already present</DD><DD><code>failures</code> - declarations that could not be applied; each is logged as it fails</DD><DD><code>elapsedMillis</code> - how long the build took</DD></DL><DL><DT><B>See Also:</B></DT><DD><a href='../../../../../org/grails/datastore/mapping/mongo/MongoDatastore.html#buildIndexAsync()' title='MongoDatastore.buildIndexAsync'>MongoDatastore.buildIndexAsync</a></DD></DL></p>
+
+ </li>
+ </ul>
+</div>
+
+<div class="summary">
+ <ul class="blockList">
+ <li class="blockList">
+ <!-- =========== NESTED CLASS SUMMARY =========== -->
+
+
+ <!-- =========== ENUM CONSTANT SUMMARY =========== -->
+
+ <!-- =========== FIELD SUMMARY =========== -->
+
+
+ <!-- =========== PROPERTY SUMMARY =========== -->
+
+
+ <!-- =========== ELEMENT SUMMARY =========== -->
+
+
+
+
+
+ <!-- ========== METHOD SUMMARY =========== -->
+ <ul class="blockList">
+
+ <li class="blockList"><a name="method_summary"><!-- --></a>
+ <h3>Inherited Methods Summary</h3>
+ <ul class="blockList">
+ <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Inherited Methods Summary table">
+ <caption><span>Inherited Methods</span><span class="tabEnd"> </span></caption>
+ <tr>
+ <th class="colFirst" scope="col">Methods inherited from class</th>
+ <th class="colLast" scope="col">Name</th>
+ </tr>
+
+ <tr class="altColor">
+ <td class="colFirst"><code>class java.lang.Record</code></td>
+ <td class="colLast"><code>java.lang.Record#equals(java.lang.Object), java.lang.Record#getClass(), java.lang.Record#hashCode(), java.lang.Record#notify(), java.lang.Record#notifyAll(), java.lang.Record#toString(), java.lang.Record#wait(), java.lang.Record#wait(long), java.lang.Record#wait(long, int)</code></td>
+ </tr>
+ </table>
+ </ul>
+ </li>
+
+ </ul>
+
+ </li>
+ </ul>
+</div>
+
+<div class="details">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+
+
+
+
+
+
+
+
+
+
+ </li>
+ </ul>
+</div>
+
+<!-- ========= END OF CLASS DATA ========= -->
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<div class="bottomNav"><a name="navbar_bottom">
+ <!-- -->
+</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/IndexBuildResult" target="_top">Frames</a></li>
+ <li><a href="IndexBuildResult.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <p><!-- Matomo -->
+<script>
+ var _paq = window._paq = window._paq || [];
+ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+ _paq.push(["setDoNotTrack", true]);
+ _paq.push(["disableCookies"]);
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="https://analytics.apache.org/";
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
+ _paq.push(['setSiteId', '79']);
+ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+ g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ })();
+</script>
+<!-- End Matomo Code --></p>
+ <a name="skip-navbar_bottom">
+ <!-- -->
+ </a>
+ </div>
+</div>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+</body>
+</html>
diff --git a/docs/snapshot/api/org/grails/datastore/mapping/mongo/MissingIndex.html b/docs/snapshot/api/org/grails/datastore/mapping/mongo/MissingIndex.html
new file mode 100644
index 000000000000..84612d2c962f
--- /dev/null
+++ b/docs/snapshot/api/org/grails/datastore/mapping/mongo/MissingIndex.html
@@ -0,0 +1,238 @@
+<!--
+
+ 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.
+
+-->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!-- **************************************************************** -->
+<!-- * PLEASE KEEP COMPLICATED EXPRESSIONS OUT OF THESE TEMPLATES, * -->
+<!-- * i.e. only iterate & print data where possible. Thanks, Jez. * -->
+<!-- **************************************************************** -->
+
+<html>
+<head>
+ <!-- Generated by groovydoc (5.1.3) -->
+ <title>MissingIndex (Grails 8.0.0-SNAPSHOT)</title>
+
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="icon">
+ <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
+
+<body class="center">
+<script type="text/javascript"><!--
+if (location.href.indexOf('is-external=true') == -1) {
+ parent.document.title="MissingIndex (Grails 8.0.0-SNAPSHOT)";
+}
+//-->
+</script>
+<noscript>
+ <div>JavaScript is disabled on your browser.</div>
+</noscript>
+<!-- ========= START OF TOP NAVBAR ======= -->
+<div class="topNav"><a name="navbar_top">
+ <!-- -->
+</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/MissingIndex" target="_top">Frames</a></li>
+ <li><a href="MissingIndex.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <a name="skip-navbar_top">
+ <!-- -->
+ </a></div>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<!-- ======== START OF CLASS DATA ======== -->
+<div class="header">
+
+ <div class="subTitle">Package: <strong>org.grails.datastore.mapping.mongo</strong></div>
+
+ <h2 title="[Java] Record MissingIndex" class="title">[Java] Record MissingIndex</h2>
+</div>
+<div class="contentContainer">
+<ul class="inheritance">
+<li><ul class="inheritance"></ul></li><li><ul class="inheritance"></ul></li><li>org.grails.datastore.mapping.mongo.MissingIndex
+</ul>
+<div class="description">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+ <!-- todo: direct known subclasses -->
+ <hr>
+
+<pre>public record MissingIndex
+extends java.lang.Record</pre>
+
+ <p> An index a domain class declares that its collection does not have.
+ <DL><DT><B>Parameters:</B></DT><DD><code>database</code> - the database the collection is in</DD><DD><code>collection</code> - the collection the index belongs on</DD><DD><code>domainClass</code> - the name of the domain class declaring it, the first of them if several do</DD><DD><code>key</code> - the declared key pattern</DD><DD><code>options</code> - the options declared with it, such as <CODE>unique</CODE> or <CODE>expireAfterSeconds</CODE></DD></DL><DL><DT><B> [...]
+
+ </li>
+ </ul>
+</div>
+
+<div class="summary">
+ <ul class="blockList">
+ <li class="blockList">
+ <!-- =========== NESTED CLASS SUMMARY =========== -->
+
+
+ <!-- =========== ENUM CONSTANT SUMMARY =========== -->
+
+ <!-- =========== FIELD SUMMARY =========== -->
+
+
+ <!-- =========== PROPERTY SUMMARY =========== -->
+
+
+ <!-- =========== ELEMENT SUMMARY =========== -->
+
+
+
+
+
+ <!-- ========== METHOD SUMMARY =========== -->
+ <ul class="blockList">
+
+ <li class="blockList"><a name="method_summary"><!-- --></a>
+ <h3>Inherited Methods Summary</h3>
+ <ul class="blockList">
+ <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Inherited Methods Summary table">
+ <caption><span>Inherited Methods</span><span class="tabEnd"> </span></caption>
+ <tr>
+ <th class="colFirst" scope="col">Methods inherited from class</th>
+ <th class="colLast" scope="col">Name</th>
+ </tr>
+
+ <tr class="altColor">
+ <td class="colFirst"><code>class java.lang.Record</code></td>
+ <td class="colLast"><code>java.lang.Record#equals(java.lang.Object), java.lang.Record#getClass(), java.lang.Record#hashCode(), java.lang.Record#notify(), java.lang.Record#notifyAll(), java.lang.Record#toString(), java.lang.Record#wait(), java.lang.Record#wait(long), java.lang.Record#wait(long, int)</code></td>
+ </tr>
+ </table>
+ </ul>
+ </li>
+
+ </ul>
+
+ </li>
+ </ul>
+</div>
+
+<div class="details">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+
+
+
+
+
+
+
+
+
+
+ </li>
+ </ul>
+</div>
+
+<!-- ========= END OF CLASS DATA ========= -->
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<div class="bottomNav"><a name="navbar_bottom">
+ <!-- -->
+</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/MissingIndex" target="_top">Frames</a></li>
+ <li><a href="MissingIndex.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <p><!-- Matomo -->
+<script>
+ var _paq = window._paq = window._paq || [];
+ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+ _paq.push(["setDoNotTrack", true]);
+ _paq.push(["disableCookies"]);
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="https://analytics.apache.org/";
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
+ _paq.push(['setSiteId', '79']);
+ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+ g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ })();
+</script>
+<!-- End Matomo Code --></p>
+ <a name="skip-navbar_bottom">
+ <!-- -->
+ </a>
+ </div>
+</div>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+</body>
+</html>
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 143ed7332155..931bc5f222b7 100644
--- a/docs/snapshot/api/org/grails/datastore/mapping/mongo/MongoDatastore.html
+++ b/docs/snapshot/api/org/grails/datastore/mapping/mongo/MongoDatastore.html
@@ -568,328 +568,361 @@ implements <a href='../../../../../MappingContextListener.html'>MappingContextLi
</tr>
<tr class="rowColor">
+ <td class="colFirst"><code></code></td>
+ <td class="colLast"><code>public java.util.concurrent.CompletableFuture<<a href='../../../../../org/grails/datastore/mapping/mongo/IndexBuildResult.html' title='IndexBuildResult'>IndexBuildResult</a>></code></td>
+ <td class="colLast"><code><strong><a href="#buildIndexAsync()">buildIndexAsync</a></strong>()</code><br>Runs the same build as <a href='#buildIndex()'>buildIndex()</a> on this connection's background index build thread, whatever
+ <CODE>grails.mongodb.buildIndexesAsync</CODE> says, and returns at once with a handle on its outcome.</td>
+ </tr>
+
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#close()">close</a></strong>()</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected static <a href='../../../../../org/grails/datastore/mapping/core/connections/ConnectionSources.html' title='ConnectionSources'>ConnectionSources</a><com.mongodb.client.MongoClient, <a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html' title='MongoConnectionSourceSettings'>MongoConnectionSourceSettings</a>></code></td>
<td class="colLast"><code><strong><a href="#createDefaultConnectionSources(com.mongodb.client.MongoClient, org.springframework.core.env.PropertyResolver, org.grails.datastore.mapping.mongo.config.MongoMappingContext, boolean)">createDefaultConnectionSources</a></strong>(com.mongodb.client.MongoClient mongoClient, <a href='https://docs.spring.io/spring-framework/docs/7.0.9/javadoc-api/org/springframework/core/env/PropertyResolver.html' title='PropertyResolver'> [...]
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected static <a href='../../../../../org/grails/datastore/mapping/mongo/config/MongoMappingContext.html'>MongoMappingContext</a></code></td>
<td class="colLast"><code><strong><a href="#createMappingContext(ConnectionSources, java.lang.Class)">createMappingContext</a></strong>(<a href='../../../../../org/grails/datastore/mapping/core/connections/ConnectionSources.html' title='ConnectionSources'>ConnectionSources</a><com.mongodb.client.MongoClient, <a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html' title='MongoConnectionSourceSettings'>MongoC [...]
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected static <a href='../../../../../org/grails/datastore/mapping/mongo/config/MongoMappingContext.html'>MongoMappingContext</a></code></td>
<td class="colLast"><code><strong><a href="#createMappingContext(org.springframework.core.env.PropertyResolver, java.lang.Class)">createMappingContext</a></strong>(<a href='https://docs.spring.io/spring-framework/docs/7.0.9/javadoc-api/org/springframework/core/env/PropertyResolver.html' title='PropertyResolver'>PropertyResolver</a> configuration, java.lang.Class classes)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected static com.mongodb.client.MongoClient</code></td>
<td class="colLast"><code><strong><a href="#createMongoClient(org.springframework.core.env.PropertyResolver, com.mongodb.MongoClientSettings$Builder, org.grails.datastore.mapping.mongo.config.MongoMappingContext)">createMongoClient</a></strong>(<a href='https://docs.spring.io/spring-framework/docs/7.0.9/javadoc-api/org/springframework/core/env/PropertyResolver.html' title='PropertyResolver'>PropertyResolver</a> configuration, com.mongodb.MongoClientSettings$Bu [...]
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected <a href='../../../../../org/grails/datastore/mapping/core/Session.html'>Session</a></code></td>
<td class="colLast"><code><strong><a href="#createSession(org.springframework.core.env.PropertyResolver)">createSession</a></strong>(<a href='https://docs.spring.io/spring-framework/docs/7.0.9/javadoc-api/org/springframework/core/env/PropertyResolver.html' title='PropertyResolver'>PropertyResolver</a> connDetails)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected <a href='../../../../../org/grails/datastore/mapping/core/Session.html'>Session</a></code></td>
<td class="colLast"><code><strong><a href="#createStatelessSession(org.springframework.core.env.PropertyResolver)">createStatelessSession</a></strong>(<a href='https://docs.spring.io/spring-framework/docs/7.0.9/javadoc-api/org/springframework/core/env/PropertyResolver.html' title='PropertyResolver'>PropertyResolver</a> connectionDetails)</code><br></td>
</tr>
+ <tr class="rowColor">
+ <td class="colFirst"><code></code></td>
+ <td class="colLast"><code>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>></code></td>
+ <td class="colLast"><code><strong><a href="#dropUndeclaredIndexes()">dropUndeclaredIndexes</a></strong>()</code><br>Drops every index that <a href='#findUndeclaredIndexes()'>findUndeclaredIndexes()</a> reports.</td>
+ </tr>
+
<tr class="altColor">
+ <td class="colFirst"><code></code></td>
+ <td class="colLast"><code>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>></code></td>
+ <td class="colLast"><code><strong><a href="#dropUndeclaredIndexes(List)">dropUndeclaredIndexes</a></strong>(java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>> indexes)</code><br>Drops the given indexes: those <a href='#findUndeclaredIndexes()'>findUndeclaredIndexes()</a> reported, once they have been reviewed.</td>
+ </tr>
+
+ <tr class="rowColor">
+ <td class="colFirst"><code></code></td>
+ <td class="colLast"><code>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/MissingIndex.html' title='MissingIndex'>MissingIndex</a>></code></td>
+ <td class="colLast"><code><strong><a href="#findMissingIndexes()">findMissingIndexes</a></strong>()</code><br>Lists the indexes the domain classes declare that their collections do not have, on the collections
+ whose declared indexes <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.</td>
+ </tr>
+
+ <tr class="altColor">
+ <td class="colFirst"><code></code></td>
+ <td class="colLast"><code>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>></code></td>
+ <td class="colLast"><code><strong><a href="#findUndeclaredIndexes()">findUndeclaredIndexes</a></strong>()</code><br>Lists the indexes that no domain class declares, on the collections whose declared indexes
+ <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.</td>
+ </tr>
+
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/gorm/events/ConfigurableApplicationEventPublisher.html'>ConfigurableApplicationEventPublisher</a></code></td>
<td class="colLast"><code><strong><a href="#getApplicationEventPublisher()">getApplicationEventPublisher</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The <a href='../../../../../org/grails/datastore/gorm/events/ConfigurableApplicationEventPublisher.html' title='ConfigurableApplicationEventPublisher'>ConfigurableApplicationEventPublisher</a> instance used by this datastore</DD></DL></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/gorm/events/AutoTimestampEventListener.html'>AutoTimestampEventListener</a></code></td>
<td class="colLast"><code><strong><a href="#getAutoTimestampEventListener()">getAutoTimestampEventListener</a></strong>()</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public org.bson.codecs.configuration.CodecRegistry</code></td>
<td class="colLast"><code><strong><a href="#getCodecRegistry()">getCodecRegistry</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The org.bson.codecs.configuration.CodecRegistry</DD></DL></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public com.mongodb.client.MongoCollection<org.bson.Document></code></td>
<td class="colLast"><code><strong><a href="#getCollection(org.grails.datastore.mapping.model.PersistentEntity)">getCollection</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br>Obtain the raw com.mongodb.client.MongoCollection for the given entity</td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public java.lang.String</code></td>
<td class="colLast"><code><strong><a href="#getCollectionName(org.grails.datastore.mapping.model.PersistentEntity)">getCollectionName</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br>Gets the default collection name for the given entity</td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/core/connections/ConnectionSources.html' title='ConnectionSources'>ConnectionSources</a><com.mongodb.client.MongoClient, <a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html' title='MongoConnectionSourceSettings'>MongoConnectionSourceSettings</a>></code></td>
<td class="colLast"><code><strong><a href="#getConnectionSources()">getConnectionSources</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The <a href='../../../../../org/grails/datastore/mapping/core/connections/ConnectionSources.html' title='ConnectionSources'>ConnectionSources</a> for this datastore</DD></DL></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public java.lang.String</code></td>
<td class="colLast"><code><strong><a href="#getDatabaseName(org.grails.datastore.mapping.model.PersistentEntity)">getDatabaseName</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/mongo/MongoDatastore.html'>MongoDatastore</a></code></td>
<td class="colLast"><code><strong><a href="#getDatastoreForConnection(java.lang.String)">getDatastoreForConnection</a></strong>(java.lang.String connectionName)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/core/Datastore.html'>Datastore</a></code></td>
<td class="colLast"><code><strong><a href="#getDatastoreForConnection(java.lang.String)">getDatastoreForConnection</a></strong>(java.lang.String connectionName)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/mongo/MongoDatastore.html'>MongoDatastore</a></code></td>
<td class="colLast"><code><strong><a href="#getDatastoreForTenantId(java.io.Serializable)">getDatastoreForTenantId</a></strong>(java.io.Serializable tenantId)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public java.lang.String</code></td>
<td class="colLast"><code><strong><a href="#getDefaultDatabase()">getDefaultDatabase</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The default database name</DD></DL></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='https://jakarta.ee/specifications/persistence/3.2/apidocs/jakarta.persistence/jakarta/persistence/FlushModeType.html' title='FlushModeType'>FlushModeType</a></code></td>
<td class="colLast"><code><strong><a href="#getDefaultFlushMode()">getDefaultFlushMode</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The default flush mode</DD></DL></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code><D></code></td>
<td class="colLast"><code>protected <a href='../../../../../org/grails/datastore/gorm/GormInstanceApi.html' title='GormInstanceApi'>GormInstanceApi</a><D></code></td>
<td class="colLast"><code><strong><a href="#getInstanceApi(Class, java.lang.String)">getInstanceApi</a></strong>(java.lang.Class<D> cls, java.lang.String qualifier)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/mongo/config/MongoMappingContext.html'>MongoMappingContext</a></code></td>
<td class="colLast"><code><strong><a href="#getMappingContext()">getMappingContext</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The mapping context</DD></DL></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public com.mongodb.client.MongoClient</code></td>
<td class="colLast"><code><strong><a href="#getMongoClient()">getMongoClient</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The com.mongodb.client.MongoClient instance</DD></DL></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/multitenancy/MultiTenancySettings.MultiTenancyMode.html'>MultiTenancyMode</a></code></td>
<td class="colLast"><code><strong><a href="#getMultiTenancyMode()">getMultiTenancyMode</a></strong>()</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.html'>PersistentEntityCodec</a></code></td>
<td class="colLast"><code><strong><a href="#getPersistentEntityCodec(org.grails.datastore.mapping.model.PersistentEntity)">getPersistentEntityCodec</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br>Obtains a <a href='../../../../../org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.html' title='PersistentEntityCodec'>PersistentEntityCodec</a> for the given e [...]
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.html'>PersistentEntityCodec</a></code></td>
<td class="colLast"><code><strong><a href="#getPersistentEntityCodec(java.lang.Class)">getPersistentEntityCodec</a></strong>(java.lang.Class entityClass)</code><br>Obtains a <a href='../../../../../org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.html' title='PersistentEntityCodec'>PersistentEntityCodec</a> for the given entity</td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public int</code></td>
<td class="colLast"><code><strong><a href="#getPhase()">getPhase</a></strong>()</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code><D></code></td>
<td class="colLast"><code>protected <a href='../../../../../org/grails/datastore/gorm/mongo/api/MongoStaticApi.html' title='MongoStaticApi'>MongoStaticApi</a><D></code></td>
<td class="colLast"><code><strong><a href="#getStaticApi(Class, java.lang.String)">getStaticApi</a></strong>(java.lang.Class<D> cls, java.lang.String qualifier)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/multitenancy/TenantResolver.html'>TenantResolver</a></code></td>
<td class="colLast"><code><strong><a href="#getTenantResolver()">getTenantResolver</a></strong>()</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='https://docs.spring.io/spring-framework/docs/7.0.9/javadoc-api/org/springframework/transaction/PlatformTransactionManager.html' title='PlatformTransactionManager'>PlatformTransactionManager</a></code></td>
<td class="colLast"><code><strong><a href="#getTransactionManager()">getTransactionManager</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The transaction manager</DD></DL></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code><D></code></td>
<td class="colLast"><code>protected <a href='../../../../../org/grails/datastore/gorm/GormValidationApi.html' title='GormValidationApi'>GormValidationApi</a><D></code></td>
<td class="colLast"><code><strong><a href="#getValidationApi(Class, java.lang.String)">getValidationApi</a></strong>(java.lang.Class<D> cls, java.lang.String qualifier)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected <a href='../../../../../org/grails/datastore/gorm/mongo/MongoGormEnhancer.html'>MongoGormEnhancer</a></code></td>
<td class="colLast"><code><strong><a href="#initialize(org.grails.datastore.mapping.mongo.connections.MongoConnectionSourceSettings)">initialize</a></strong>(<a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html'>MongoConnectionSourceSettings</a> settings)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected <a href='../../../../../org/grails/datastore/gorm/mongo/MongoGormEnhancer.html'>MongoGormEnhancer</a></code></td>
<td class="colLast"><code><strong><a href="#initialize(org.grails.datastore.mapping.mongo.connections.MongoConnectionSourceSettings)">initialize</a></strong>(<a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html'>MongoConnectionSourceSettings</a> settings)</code><br>Runs the initialization sequence</td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="#initializeIndices(org.grails.datastore.mapping.model.PersistentEntity)">initializeIndices</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br>Indexes any properties that are mapped with index:true. </td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public boolean</code></td>
<td class="colLast"><code><strong><a href="#isBuildIndexes()">isBuildIndexes</a></strong>()</code><br>Whether GORM creates and reconciles the indexes declared in the domain class mapping blocks by itself:
when the datastore starts, and for connections and domain classes added later. </td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public boolean</code></td>
<td class="colLast"><code><strong><a href="#isBuildIndexesAsync()">isBuildIndexesAsync</a></strong>()</code><br>Whether index builds run on a background thread instead of blocking the thread that starts them - the
one GORM starts on startup, and any <a href='#buildIndex()'>buildIndex()</a> the application calls. </td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public boolean</code></td>
<td class="colLast"><code><strong><a href="#isRunning()">isRunning</a></strong>()</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public boolean</code></td>
<td class="colLast"><code><strong><a href="#isSchemaless()">isSchemaless</a></strong>()</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public boolean</code></td>
<td class="colLast"><code><strong><a href="#isTransactionsEnabled()">isTransactionsEnabled</a></strong>()</code><br>Whether GORM should use real MongoDB multi-document transactions (a server-side
<CODE>ClientSession</CODE>) for transactional operations. </td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#newConnectionSource(ConnectionSource)">newConnectionSource</a></strong>(<a href='../../../../../org/grails/datastore/mapping/core/connections/ConnectionSource.html' title='ConnectionSource'>ConnectionSource</a><com.mongodb.client.MongoClient, <a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html' title='MongoConnectionSourceSettings'>MongoConnectionSourceSettings [...]
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#persistentEntityAdded(org.grails.datastore.mapping.model.PersistentEntity)">persistentEntityAdded</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#persistentEntityAdded(org.grails.datastore.mapping.model.PersistentEntity)">persistentEntityAdded</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="#registerAllEntitiesWithEnhancer()">registerAllEntitiesWithEnhancer</a></strong>()</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="#registerEntity(org.grails.datastore.mapping.model.PersistentEntity)">registerEntity</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="#registerEventListeners(org.grails.datastore.gorm.events.ConfigurableApplicationEventPublisher)">registerEventListeners</a></strong>(<a href='../../../../../org/grails/datastore/gorm/events/ConfigurableApplicationEventPublisher.html'>ConfigurableApplicationEventPublisher</a> eventPublisher)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public java.io.Serializable</code></td>
<td class="colLast"><code><strong><a href="#resolveTenantIdentifier()">resolveTenantIdentifier</a></strong>()</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public java.lang.Iterable<java.io.Serializable></code></td>
<td class="colLast"><code><strong><a href="#resolveTenantIds()">resolveTenantIds</a></strong>()</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#setCodecProviders(List)">setCodecProviders</a></strong>(java.util.List<org.bson.codecs.configuration.CodecProvider> codecProviders)</code><br>Sets any additional codec providers</td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#setCodecRegistries(List)">setCodecRegistries</a></strong>(java.util.List<org.bson.codecs.configuration.CodecRegistry> codecRegistries)</code><br>Sets any additional codec registries</td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#setCodecs(List)">setCodecs</a></strong>(java.util.List<org.bson.codecs.Codec<?>> codecs)</code><br>Sets any additional codecs</td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#setMessageSource(List)">setMessageSource</a></strong>(java.util.List<<a href='https://docs.spring.io/spring-framework/docs/7.0.9/javadoc-api/org/springframework/context/MessageSource.html' title='MessageSource'>MessageSource</a>> messageSources)</code><br>The message source used for validation messages</td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#setMessageSource(org.springframework.context.MessageSource)">setMessageSource</a></strong>(<a href='https://docs.spring.io/spring-framework/docs/7.0.9/javadoc-api/org/springframework/context/MessageSource.html' title='MessageSource'>MessageSource</a> messageSource)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#start()">start</a></strong>()</code><br>Builds a replacement for each com.mongodb.client.MongoClient that <a href='#stop()'>stop()</a> closed, using the
same factory the original was built with, so settings applied at startup still apply. </td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#stop()">stop</a></strong>()</code><br>Closes the com.mongodb.client.MongoClient of every connection, so the process can be checkpointed.</td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code><T1></code></td>
<td class="colLast"><code>public <a href='../../../../../T1.html'>T1</a></code></td>
<td class="colLast"><code><strong><a href="#withNewSession(java.io.Serializable, Closure)">withNewSession</a></strong>(java.io.Serializable tenantId, <a href='https://docs.groovy-lang.org/5.1.3/html/gapi/groovy/lang/Closure.html' title='Closure'>Closure</a><T1> callable)</code><br></td>
@@ -1531,11 +1564,37 @@ implements <a href='../../../../../MappingContextListener.html'>MappingContextLi
<p>Each index is created by a command that the server answers only once the index has been built,
so this blocks the calling thread for as long as MongoDB takes to build every declared index. With
<CODE>grails.mongodb.buildIndexesAsync</CODE> enabled the work goes to a background thread and this
- returns immediately instead.
+ returns immediately instead. <a href='#buildIndexAsync()'>buildIndexAsync()</a> runs it in the background whatever the setting,
+ and reports the outcome to its caller. Builds on a connection run one at a time, wherever they run: a
+ build on the calling thread first waits for one running in the background, and the other way round, and a
+ domain class registered after startup is indexed once neither is running.
</p>
</li>
</ul>
+ <a name="buildIndexAsync()"><!-- --></a>
+ <ul class="blockListLast">
+ <li class="blockList">
+ <h4>public java.util.concurrent.CompletableFuture<<a href='../../../../../org/grails/datastore/mapping/mongo/IndexBuildResult.html' title='IndexBuildResult'>IndexBuildResult</a>> <strong>buildIndexAsync</strong>()</h4>
+ <p> Runs the same build as <a href='#buildIndex()'>buildIndex()</a> on this connection's background index build thread, whatever
+ <CODE>grails.mongodb.buildIndexesAsync</CODE> says, and returns at once with a handle on its outcome.
+
+ <p>The future completes with the build's <a href='../../../../../org/grails/datastore/mapping/mongo/IndexBuildResult.html' title='IndexBuildResult'>IndexBuildResult</a> once every declaration has been applied,
+ including when some of them failed: those are counted in <a href='../../../../../org/grails/datastore/mapping/mongo/IndexBuildResult.html#failures()' title='IndexBuildResult.failures'>IndexBuildResult.failures</a> and logged
+ as they happen. It completes exceptionally with the exception that stopped the build partway, such as a
+ lost connection or a write concern the server could not satisfy. Created and already-present indexes are always told apart, whatever the log level.
+
+ <p>Builds on a connection run one at a time, so a build requested while another is running waits for it,
+ including one running on a caller's thread with <a href='#buildIndex()'>buildIndex()</a>, or one indexing a domain class
+ registered after startup.
+ Cancelling the future does not stop the build. If the datastore is stopped or closed, the future completes
+ exceptionally at once, and a build that stopping or closing the datastore cuts short completes
+ exceptionally too; a restart runs the cut-short build again, without a future. Each named connection
+ builds its own domain classes: call this on <a href='#getDatastoreForConnection(java.lang.String)'>getDatastoreForConnection(String)</a> for those.
+ <DL><DT><B>Returns:</B></DT><DD>the outcome of the build</DD></DL></p>
+ </li>
+ </ul>
+
<a name="close()"><!-- --></a>
<ul class="blockListLast">
<li class="blockList">
@@ -1596,6 +1655,75 @@ implements <a href='../../../../../MappingContextListener.html'>MappingContextLi
</li>
</ul>
+ <a name="dropUndeclaredIndexes()"><!-- --></a>
+ <ul class="blockListLast">
+ <li class="blockList">
+ <h4>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>> <strong>dropUndeclaredIndexes</strong>()</h4>
+ <p> Drops every index that <a href='#findUndeclaredIndexes()'>findUndeclaredIndexes()</a> reports.
+
+ <p>Run this deliberately, once every instance of the application runs the release whose domain classes
+ declare the indexes to keep. An instance still on an earlier release does not declare what a later
+ release added, nor an index created by hand ahead of a deployment, so to it those indexes are
+ undeclared and this drops them.
+ <DL><DT><B>Returns:</B></DT><DD>the indexes dropped</DD></DL></p>
+ </li>
+ </ul>
+
+ <a name="dropUndeclaredIndexes(List)"><!-- --></a>
+ <ul class="blockListLast">
+ <li class="blockList">
+ <h4>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>> <strong>dropUndeclaredIndexes</strong>(java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>> indexes)</h4>
+ <p> Drops the given indexes: those <a href='#findUndeclaredIndexes()'>findUndeclaredIndexes()</a> reported, once they have been reviewed.
+
+ <p>Each index is checked again before it is dropped, since the reviewed list can be older than what is on
+ the server: one is dropped only while the index of that name is on the keys reviewed, its collection is
+ mapped on this datastore's connection, and no domain class mapped to it declares those keys. An index that
+ no longer exists, or whose collection no longer does, is skipped, and so is one that fails a check, which
+ is logged at <CODE>WARN</CODE>.
+ <DL><DT><B>Parameters:</B></DT><DD><code>indexes</code> - the indexes to drop</DD></DL><DL><DT><B>Returns:</B></DT><DD>the indexes dropped</DD></DL></p>
+ </li>
+ </ul>
+
+ <a name="findMissingIndexes()"><!-- --></a>
+ <ul class="blockListLast">
+ <li class="blockList">
+ <h4>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/MissingIndex.html' title='MissingIndex'>MissingIndex</a>> <strong>findMissingIndexes</strong>()</h4>
+ <p> Lists the indexes the domain classes declare that their collections do not have, on the collections
+ whose declared indexes <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.
+
+ <p>A declared index is present when its collection has an index on the same key pattern, the same fields
+ in the same order, whatever its name and options: an option that differs is the build's to reconcile.
+ A text index is present when one indexes the same text fields, in any order, with the same keys before and
+ after them, whatever its weights. Keys that several classes mapped to one collection declare are reported
+ once. Nothing is changed:
+ <a href='#buildIndex()'>buildIndex()</a> or <a href='#buildIndexAsync()'>buildIndexAsync()</a> creates them. Each named connection has its own
+ domain classes, so call this on <a href='#getDatastoreForConnection(java.lang.String)'>getDatastoreForConnection(String)</a> for those.
+ <DL><DT><B>Returns:</B></DT><DD>the missing indexes, collection by collection, in the order the domain classes declare them</DD></DL></p>
+ </li>
+ </ul>
+
+ <a name="findUndeclaredIndexes()"><!-- --></a>
+ <ul class="blockListLast">
+ <li class="blockList">
+ <h4>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>> <strong>findUndeclaredIndexes</strong>()</h4>
+ <p> Lists the indexes that no domain class declares, on the collections whose declared indexes
+ <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.
+
+ <p>An index is declared when a domain class mapped to the same collection declares its key pattern, the
+ same fields in the same order, with <CODE>compoundIndex</CODE>, <CODE>index</CODE> or a property's
+ <CODE>index: true</CODE>. Its name and options do not matter. A text index is declared when a class declares
+ text on the same fields, in any order, with the same keys before and after them; its weights do not
+ matter. The <CODE>_id</CODE> index is never reported, and
+ neither is any index on a collection that no domain class maps. An index that an
+ <a href='#initializeIndices(org.grails.datastore.mapping.model.PersistentEntity)'>initializeIndices(PersistentEntity)</a> override creates by itself is not a declaration, so it is
+ reported.
+
+ <p>Nothing is changed: see <a href='#dropUndeclaredIndexes()'>dropUndeclaredIndexes()</a>. Each named connection has its own domain
+ classes, so call this on <a href='#getDatastoreForConnection(java.lang.String)'>getDatastoreForConnection(String)</a> for those.
+ <DL><DT><B>Returns:</B></DT><DD>the undeclared indexes, collection by collection, in the order the server lists them</DD></DL></p>
+ </li>
+ </ul>
+
<a name="getApplicationEventPublisher()"><!-- --></a>
<ul class="blockListLast">
<li class="blockList">
diff --git a/docs/snapshot/api/org/grails/datastore/mapping/mongo/UndeclaredIndex.html b/docs/snapshot/api/org/grails/datastore/mapping/mongo/UndeclaredIndex.html
new file mode 100644
index 000000000000..83118f2acdc7
--- /dev/null
+++ b/docs/snapshot/api/org/grails/datastore/mapping/mongo/UndeclaredIndex.html
@@ -0,0 +1,238 @@
+<!--
+
+ 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.
+
+-->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!-- **************************************************************** -->
+<!-- * PLEASE KEEP COMPLICATED EXPRESSIONS OUT OF THESE TEMPLATES, * -->
+<!-- * i.e. only iterate & print data where possible. Thanks, Jez. * -->
+<!-- **************************************************************** -->
+
+<html>
+<head>
+ <!-- Generated by groovydoc (5.1.3) -->
+ <title>UndeclaredIndex (Grails 8.0.0-SNAPSHOT)</title>
+
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="icon">
+ <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
+
+<body class="center">
+<script type="text/javascript"><!--
+if (location.href.indexOf('is-external=true') == -1) {
+ parent.document.title="UndeclaredIndex (Grails 8.0.0-SNAPSHOT)";
+}
+//-->
+</script>
+<noscript>
+ <div>JavaScript is disabled on your browser.</div>
+</noscript>
+<!-- ========= START OF TOP NAVBAR ======= -->
+<div class="topNav"><a name="navbar_top">
+ <!-- -->
+</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/UndeclaredIndex" target="_top">Frames</a></li>
+ <li><a href="UndeclaredIndex.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <a name="skip-navbar_top">
+ <!-- -->
+ </a></div>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<!-- ======== START OF CLASS DATA ======== -->
+<div class="header">
+
+ <div class="subTitle">Package: <strong>org.grails.datastore.mapping.mongo</strong></div>
+
+ <h2 title="[Java] Record UndeclaredIndex" class="title">[Java] Record UndeclaredIndex</h2>
+</div>
+<div class="contentContainer">
+<ul class="inheritance">
+<li><ul class="inheritance"></ul></li><li><ul class="inheritance"></ul></li><li>org.grails.datastore.mapping.mongo.UndeclaredIndex
+</ul>
+<div class="description">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+ <!-- todo: direct known subclasses -->
+ <hr>
+
+<pre>public record UndeclaredIndex
+extends java.lang.Record</pre>
+
+ <p> An index on a collection that domain classes map, whose keys none of those domain classes declares.
+ <DL><DT><B>Parameters:</B></DT><DD><code>database</code> - the database the collection is in</DD><DD><code>collection</code> - the collection the index is on</DD><DD><code>name</code> - the name of the index</DD><DD><code>key</code> - the index's key pattern, as <CODE>listIndexes</CODE> reports it</DD><DD><code>definition</code> - the whole index description <CODE>listIndexes</CODE> reports, options included</DD></DL><DL><DT><B>See Also:</B></DT><DD><a href='../../. [...]
+
+ </li>
+ </ul>
+</div>
+
+<div class="summary">
+ <ul class="blockList">
+ <li class="blockList">
+ <!-- =========== NESTED CLASS SUMMARY =========== -->
+
+
+ <!-- =========== ENUM CONSTANT SUMMARY =========== -->
+
+ <!-- =========== FIELD SUMMARY =========== -->
+
+
+ <!-- =========== PROPERTY SUMMARY =========== -->
+
+
+ <!-- =========== ELEMENT SUMMARY =========== -->
+
+
+
+
+
+ <!-- ========== METHOD SUMMARY =========== -->
+ <ul class="blockList">
+
+ <li class="blockList"><a name="method_summary"><!-- --></a>
+ <h3>Inherited Methods Summary</h3>
+ <ul class="blockList">
+ <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Inherited Methods Summary table">
+ <caption><span>Inherited Methods</span><span class="tabEnd"> </span></caption>
+ <tr>
+ <th class="colFirst" scope="col">Methods inherited from class</th>
+ <th class="colLast" scope="col">Name</th>
+ </tr>
+
+ <tr class="altColor">
+ <td class="colFirst"><code>class java.lang.Record</code></td>
+ <td class="colLast"><code>java.lang.Record#equals(java.lang.Object), java.lang.Record#getClass(), java.lang.Record#hashCode(), java.lang.Record#notify(), java.lang.Record#notifyAll(), java.lang.Record#toString(), java.lang.Record#wait(), java.lang.Record#wait(long), java.lang.Record#wait(long, int)</code></td>
+ </tr>
+ </table>
+ </ul>
+ </li>
+
+ </ul>
+
+ </li>
+ </ul>
+</div>
+
+<div class="details">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+
+
+
+
+
+
+
+
+
+
+ </li>
+ </ul>
+</div>
+
+<!-- ========= END OF CLASS DATA ========= -->
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<div class="bottomNav"><a name="navbar_bottom">
+ <!-- -->
+</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/UndeclaredIndex" target="_top">Frames</a></li>
+ <li><a href="UndeclaredIndex.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <p><!-- Matomo -->
+<script>
+ var _paq = window._paq = window._paq || [];
+ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+ _paq.push(["setDoNotTrack", true]);
+ _paq.push(["disableCookies"]);
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="https://analytics.apache.org/";
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
+ _paq.push(['setSiteId', '79']);
+ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+ g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ })();
+</script>
+<!-- End Matomo Code --></p>
+ <a name="skip-navbar_bottom">
+ <!-- -->
+ </a>
+ </div>
+</div>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+</body>
+</html>
diff --git a/docs/snapshot/grails-data/developer-manual/gettingStarted.html b/docs/snapshot/grails-data/developer-manual/gettingStarted.html
index c916342ef5f8..c00f4173c08f 100644
--- a/docs/snapshot/grails-data/developer-manual/gettingStarted.html
+++ b/docs/snapshot/grails-data/developer-manual/gettingStarted.html
@@ -523,7 +523,7 @@ cd grails-core</pre>
<div id="footer">
<div id="footer-text">
Version 8.0.0-SNAPSHOT<br>
-Last updated 2026-10-04 07:08:04 UTC
+Last updated 2026-10-04 14:34:45 UTC
</div>
</div>
</body>
diff --git a/docs/snapshot/grails-data/developer-manual/introduction.html b/docs/snapshot/grails-data/developer-manual/introduction.html
index c480abab34f9..924b7c529994 100644
--- a/docs/snapshot/grails-data/developer-manual/introduction.html
+++ b/docs/snapshot/grails-data/developer-manual/introduction.html
@@ -476,7 +476,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<div id="footer">
<div id="footer-text">
Version 8.0.0-SNAPSHOT<br>
-Last updated 2026-10-04 07:08:04 UTC
+Last updated 2026-10-04 14:34:45 UTC
</div>
</div>
</body>
diff --git a/docs/snapshot/grails-data/developer-manual/stepByStep.html b/docs/snapshot/grails-data/developer-manual/stepByStep.html
index 904bfe83a582..88686f261f13 100644
--- a/docs/snapshot/grails-data/developer-manual/stepByStep.html
+++ b/docs/snapshot/grails-data/developer-manual/stepByStep.html
@@ -621,7 +621,7 @@ class XyzTestSuite {
<div id="footer">
<div id="footer-text">
Version 8.0.0-SNAPSHOT<br>
-Last updated 2026-10-04 07:08:04 UTC
+Last updated 2026-10-04 14:34:45 UTC
</div>
</div>
</body>
diff --git a/docs/snapshot/grails-data/developer-manual/testing.html b/docs/snapshot/grails-data/developer-manual/testing.html
index 56d3118e9272..54eb5056fd36 100644
--- a/docs/snapshot/grails-data/developer-manual/testing.html
+++ b/docs/snapshot/grails-data/developer-manual/testing.html
@@ -511,7 +511,7 @@ class PagedResultSpec extends GormDatastoreSpec{
<div id="footer">
<div id="footer-text">
Version 8.0.0-SNAPSHOT<br>
-Last updated 2026-10-04 07:08:04 UTC
+Last updated 2026-10-04 14:34:45 UTC
</div>
</div>
</body>
diff --git a/docs/snapshot/grails-data/developer-manual/understandingApi.html b/docs/snapshot/grails-data/developer-manual/understandingApi.html
index c86409bf3fe3..21b127b2db37 100644
--- a/docs/snapshot/grails-data/developer-manual/understandingApi.html
+++ b/docs/snapshot/grails-data/developer-manual/understandingApi.html
@@ -454,7 +454,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<div id="footer">
<div id="footer-text">
Version 8.0.0-SNAPSHOT<br>
-Last updated 2026-10-04 07:08:04 UTC
+Last updated 2026-10-04 14:34:45 UTC
</div>
</div>
</body>
diff --git a/docs/snapshot/grails-data/developer-manual/understandingApi/datastoreBasics.html b/docs/snapshot/grails-data/developer-manual/understandingApi/datastoreBasics.html
index a9e355ef19df..642e11cec961 100644
--- a/docs/snapshot/grails-data/developer-manual/understandingApi/datastoreBasics.html
+++ b/docs/snapshot/grails-data/developer-manual/understandingApi/datastoreBasics.html
@@ -561,7 +561,7 @@ protected Session createSession(PropertyResolver connDetails) {
<div id="footer">
<div id="footer-text">
Version 8.0.0-SNAPSHOT<br>
-Last updated 2026-10-04 07:08:04 UTC
+Last updated 2026-10-04 14:34:45 UTC
</div>
</div>
</body>
diff --git a/docs/snapshot/grails-data/developer-manual/understandingApi/gormApis.html b/docs/snapshot/grails-data/developer-manual/understandingApi/gormApis.html
index b27b9df099c7..7b6595604d8e 100644
--- a/docs/snapshot/grails-data/developer-manual/understandingApi/gormApis.html
+++ b/docs/snapshot/grails-data/developer-manual/understandingApi/gormApis.html
@@ -496,7 +496,7 @@ class Neo4jEntityTraitProvider implements GormEntityTraitProvider {
<div id="footer">
<div id="footer-text">
Version 8.0.0-SNAPSHOT<br>
-Last updated 2026-10-04 07:08:04 UTC
+Last updated 2026-10-04 14:34:45 UTC
</div>
</div>
</body>
diff --git a/docs/snapshot/grails-data/developer-manual/understandingApi/gormEnhancer.html b/docs/snapshot/grails-data/developer-manual/understandingApi/gormEnhancer.html
index 70b321ec3465..0c771ef5be99 100644
--- a/docs/snapshot/grails-data/developer-manual/understandingApi/gormEnhancer.html
+++ b/docs/snapshot/grails-data/developer-manual/understandingApi/gormEnhancer.html
@@ -488,7 +488,7 @@ enhancer.enhance()</code></pre>
<div id="footer">
<div id="footer-text">
Version 8.0.0-SNAPSHOT<br>
-Last updated 2026-10-04 07:08:04 UTC
+Last updated 2026-10-04 14:34:45 UTC
</div>
</div>
</body>
diff --git a/docs/snapshot/grails-data/developer-manual/understandingApi/implementingCrud.html b/docs/snapshot/grails-data/developer-manual/understandingApi/implementingCrud.html
index a57c4fd687aa..14faeed6dd56 100644
--- a/docs/snapshot/grails-data/developer-manual/understandingApi/implementingCrud.html
+++ b/docs/snapshot/grails-data/developer-manual/understandingApi/implementingCrud.html
@@ -673,7 +673,7 @@ protected void deleteEntry(String family, final Object key, final Object entry)
<div id="footer">
<div id="footer-text">
Version 8.0.0-SNAPSHOT<br>
-Last updated 2026-10-04 07:08:04 UTC
+Last updated 2026-10-04 14:34:45 UTC
</div>
</div>
</body>
diff --git a/docs/snapshot/grails-data/developer-manual/understandingApi/implementingQueries.html b/docs/snapshot/grails-data/developer-manual/understandingApi/implementingQueries.html
index f7ea3e249739..dd9accab968f 100644
--- a/docs/snapshot/grails-data/developer-manual/understandingApi/implementingQueries.html
+++ b/docs/snapshot/grails-data/developer-manual/understandingApi/implementingQueries.html
@@ -588,7 +588,7 @@ If, for instance, the underlying datastore does not support the calculation of a
<div id="footer">
<div id="footer-text">
Version 8.0.0-SNAPSHOT<br>
-Last updated 2026-10-04 07:08:04 UTC
+Last updated 2026-10-04 14:34:45 UTC
</div>
</div>
</body>
diff --git a/docs/snapshot/grails-data/developer-manual/understandingApi/secondaryIndexes.html b/docs/snapshot/grails-data/developer-manual/understandingApi/secondaryIndexes.html
index 20c3975a0852..6e7a22531f03 100644
--- a/docs/snapshot/grails-data/developer-manual/understandingApi/secondaryIndexes.html
+++ b/docs/snapshot/grails-data/developer-manual/understandingApi/secondaryIndexes.html
@@ -526,7 +526,7 @@ If the underlying datastore supports secondary indexes then it is ok to just ret
<div id="footer">
<div id="footer-text">
Version 8.0.0-SNAPSHOT<br>
-Last updated 2026-10-04 07:08:04 UTC
+Last updated 2026-10-04 14:34:45 UTC
</div>
</div>
</body>
diff --git a/docs/snapshot/grails-data/hibernate5/api/allclasses-frame.html b/docs/snapshot/grails-data/hibernate5/api/allclasses-frame.html
index bfbff13a13ef..efc2e809b92d 100644
--- a/docs/snapshot/grails-data/hibernate5/api/allclasses-frame.html
+++ b/docs/snapshot/grails-data/hibernate5/api/allclasses-frame.html
@@ -679,6 +679,7 @@
<li><a href="org/grails/datastore/gorm/services/Implemented.html" title="annotation type in org.grails.datastore.gorm.services" target="classFrame">Implemented</a></li>
<li><a href="org/grails/datastore/mapping/core/connections/InMemoryConnectionSources.html" title="class in org.grails.datastore.mapping.core.connections" target="classFrame">InMemoryConnectionSources</a></li>
<li><a href="org/grails/orm/hibernate/cfg/domainbinding/binder/IndexBinder.html" title="class in org.grails.orm.hibernate.cfg.domainbinding.binder" target="classFrame">IndexBinder</a></li>
+<li><a href="org/grails/datastore/mapping/mongo/IndexBuildResult.html" title="record in org.grails.datastore.mapping.mongo" target="classFrame">IndexBuildResult</a></li>
<li><a href="org/grails/datastore/mapping/model/lifecycle/Initializable.html" title="interface in org.grails.datastore.mapping.model.lifecycle" target="classFrame"><I>Initializable</I></a></li>
<li><a href="org/grails/gorm/graphql/types/input/InputObjectTypeBuilder.html" title="interface in org.grails.gorm.graphql.types.input" target="classFrame"><I>InputObjectTypeBuilder</I></a></li>
<li><a href="org/grails/orm/hibernate/InstanceApiHelper.html" title="class in org.grails.orm.hibernate" target="classFrame">InstanceApiHelper</a></li>
@@ -830,6 +831,7 @@
<li><a href="org/grails/datastore/mapping/core/MethodNotImplementedException.html" title="class in org.grails.datastore.mapping.core" target="classFrame">MethodNotImplementedException</a></li>
<li><a href="org/grails/datastore/gorm/validation/jakarta/services/implementers/MethodValidationImplementer.html" title="class in org.grails.datastore.gorm.validation.jakarta.services.implementers" target="classFrame">MethodValidationImplementer</a></li>
<li><a href="grails/mongodb/geo/Metric.html" title="class in grails.mongodb.geo" target="classFrame">Metric</a></li>
+<li><a href="org/grails/datastore/mapping/mongo/MissingIndex.html" title="record in org.grails.datastore.mapping.mongo" target="classFrame">MissingIndex</a></li>
<li><a href="org/grails/datastore/mapping/engine/ModificationTrackingEntityAccess.html" title="class in org.grails.datastore.mapping.engine" target="classFrame">ModificationTrackingEntityAccess</a></li>
<li><a href="grails/mongodb/api/MongoAllOperations.html" title="interface in grails.mongodb.api" target="classFrame"><I>MongoAllOperations</I></a></li>
<li><a href="org/grails/datastore/mapping/mongo/config/MongoAttribute.html" title="class in org.grails.datastore.mapping.mongo.config" target="classFrame">MongoAttribute</a></li>
@@ -1319,6 +1321,7 @@
<li><a href="org/grails/gorm/graphql/types/scalars/coercing/URICoercion.html" title="class in org.grails.gorm.graphql.types.scalars.coercing" target="classFrame">URICoercion</a></li>
<li><a href="org/grails/gorm/graphql/types/scalars/coercing/URLCoercion.html" title="class in org.grails.gorm.graphql.types.scalars.coercing" target="classFrame">URLCoercion</a></li>
<li><a href="org/grails/gorm/graphql/types/scalars/coercing/UUIDCoercion.html" title="class in org.grails.gorm.graphql.types.scalars.coercing" target="classFrame">UUIDCoercion</a></li>
+<li><a href="org/grails/datastore/mapping/mongo/UndeclaredIndex.html" title="record in org.grails.datastore.mapping.mongo" target="classFrame">UndeclaredIndex</a></li>
<li><a href="org/grails/orm/hibernate/cfg/domainbinding/secondpass/UnidirectionalOneToManyBinder.html" title="class in org.grails.orm.hibernate.cfg.domainbinding.secondpass" target="classFrame">UnidirectionalOneToManyBinder</a></li>
<li><a href="org/grails/orm/hibernate/cfg/domainbinding/secondpass/UnidirectionalOneToManyInverseValuesBinder.html" title="class in org.grails.orm.hibernate.cfg.domainbinding.secondpass" target="classFrame">UnidirectionalOneToManyInverseValuesBinder</a></li>
<li><a href="org/grails/orm/hibernate/cfg/domainbinding/binder/UnionSubclassBinder.html" title="class in org.grails.orm.hibernate.cfg.domainbinding.binder" target="classFrame">UnionSubclassBinder</a></li>
diff --git a/docs/snapshot/grails-data/hibernate5/api/index-all.html b/docs/snapshot/grails-data/hibernate5/api/index-all.html
index 65b25f4080fc..042f58f56ce0 100644
--- a/docs/snapshot/grails-data/hibernate5/api/index-all.html
+++ b/docs/snapshot/grails-data/hibernate5/api/index-all.html
@@ -1878,6 +1878,9 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block">Creates and reconciles the indexes declared by the domain classes mapped to this datastore's connection.</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/neo4j/connections/Neo4jConnectionSourceSettings.html#buildIndex" title="Property in Neo4jConnectionSourceSettings">buildIndex</a></span> - Property in <a href="org/grails/datastore/gorm/neo4j/connections/Neo4jConnectionSourceSettings.html">Neo4jConnectionSourceSettings</a>
</dt><dd> <div class="block">Whether to build the Neo4j index</div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/MongoDatastore.html#buildIndexAsync()" title="Method in MongoDatastore">buildIndexAsync()</a></span> - Method in <a href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">Runs the same build as <a href='#buildIndex()'>buildIndex()</a> on this connection's background index build thread, whatever
+ <CODE>grails.mongodb.buildIndexesAsync</CODE> says, and returns at once with a handle on its outcome.</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/connections/AbstractMongoConnectionSourceSettings.html#buildIndexes" title="Property in AbstractMongoConnectionSourceSettings">buildIndexes</a></span> - Property in <a href="org/grails/datastore/mapping/mongo/connections/AbstractMongoConnectionSourceSettings.html">AbstractMongoConnectionSourceSettings</a>
</dt><dd> <div class="block">Whether GORM creates and reconciles the indexes declared in domain class mapping blocks by
itself when the datastore starts. </div></dd>
@@ -5577,6 +5580,8 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block">Whether to drop existing data</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/mongo/extensions/MongoExtensions.html#dropIndex(MongoCollection<Document>, Map<String, Object>, com.mongodb.client.model.DropIndexOptions)" title="Method in MongoExtensions">dropIndex(MongoCollection<Document>, Map<String, Object>, com.mongodb.client.model.DropIndexOptions)</a></span> - Method in <a href="org/grails/datastore/gorm/mongo/extensions/MongoExtensions.html">MongoExtensions</a>
</dt><dd> <div class="block"></div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/MongoDatastore.html#dropUndeclaredIndexes(List<UndeclaredIndex>)" title="Method in MongoDatastore">dropUndeclaredIndexes(List<UndeclaredIndex>)</a></span> - Method in <a href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">Drops the given indexes: those <a href='#findUndeclaredIndexes()'>findUndeclaredIndexes()</a> reported, once they have been reviewed.</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/neo4j/engine/Neo4jEntityPersister.html#DYNAMIC_ASSOCIATION_PARAM" title="Field in Neo4jEntityPersister">DYNAMIC_ASSOCIATION_PARAM</a></span> - Field in <a href="org/grails/datastore/gorm/neo4j/engine/Neo4jEntityPersister.html">Neo4jEntityPersister</a>
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/cfg/domainbinding/hibernate/HibernateMappingKeyword.html#DYNAMIC_INSERT" title="Enum Constant in HibernateMappingKeyword">DYNAMIC_INSERT</a></span> - Enum Constant in <a href="org/grails/orm/hibernate/cfg/domainbinding/hibernate/HibernateMappingKeyword.html">HibernateMappingKeyword</a>
@@ -6564,6 +6569,9 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/services/implementers/FindOneImplementer.html#findMethodToInvoke(org.codehaus.groovy.ast.ClassNode, org.codehaus.groovy.ast.MethodNode)" title="Method in FindOneImplementer">findMethodToInvoke(org.codehaus.groovy.ast.ClassNode, org.codehaus.groovy.ast.MethodNode)</a></span> - Method in <a href="org/grails/datastore/gorm/services/implementers/FindOneImplementer.html">FindOneImplementer</a>
</dt><dd> <div class="block"></div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/MongoDatastore.html#findMissingIndexes()" title="Method in MongoDatastore">findMissingIndexes()</a></span> - Method in <a href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">Lists the indexes the domain classes declare that their collections do not have, on the collections
+ whose declared indexes <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/mongo/extensions/MongoExtensions.html#findOne(MongoCollection<Document>, Map<String, Object>, Map<String, Object>, Map<String, Object>, com.mongodb.ReadPreference)" title="Method in MongoExtensions">findOne(MongoCollection<Document>, Map<String, Object>, Map<String, Object>, Map<String, Object>, com.mongodb.ReadPreference)</a></span> - Method in <a href="org/grails/datastore/gorm/mongo/extensions/MongoExt [...]
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/AbstractMongoSession.html#findOneAndDelete(com.mongodb.client.MongoCollection<T>, org.bson.conversions.Bson, com.mongodb.client.model.FindOneAndDeleteOptions)" title="Method in AbstractMongoSession">findOneAndDelete(com.mongodb.client.MongoCollection<T>, org.bson.conversions.Bson, com.mongodb.client.model.FindOneAndDeleteOptions)</a></span> - Method in <a href="org/grails/datastore/mapping/mongo/AbstractMongoSessi [...]
@@ -6710,6 +6718,9 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/jdbc/DataSourceBuilder.html#findType()" title="Method in DataSourceBuilder">findType()</a></span> - Method in <a href="org/grails/datastore/gorm/jdbc/DataSourceBuilder.html">DataSourceBuilder</a>
</dt><dd> <div class="block"></div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/MongoDatastore.html#findUndeclaredIndexes()" title="Method in MongoDatastore">findUndeclaredIndexes()</a></span> - Method in <a href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">Lists the indexes that no domain class declares, on the collections whose declared indexes
+ <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/GormEnhancer.html#findValidationApi(Class<D>, java.lang.String)" title="Method in GormEnhancer">findValidationApi(Class<D>, java.lang.String)</a></span> - Method in <a href="org/grails/datastore/gorm/GormEnhancer.html">GormEnhancer</a>
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/GormRegistry.html#findValidationApi(Class<D>, java.lang.String)" title="Method in GormRegistry">findValidationApi(Class<D>, java.lang.String)</a></span> - Method in <a href="org/grails/datastore/gorm/GormRegistry.html">GormRegistry</a>
@@ -11840,6 +11851,8 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block">Configures the index attributes</div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/cfg/domainbinding/binder/IndexBinder.html" title="Class in org.grails.orm.hibernate.cfg.domainbinding.binder">IndexBinder</a></span> - Class in <a href="./org/grails/orm/hibernate/cfg/domainbinding/binder/package-summary.html">org.grails.orm.hibernate.cfg.domainbinding.binder</a>
</dt><dd><div class="block"></div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/IndexBuildResult.html" title="Record in org.grails.datastore.mapping.mongo">IndexBuildResult</a></span> - Record in <a href="./org/grails/datastore/mapping/mongo/package-summary.html">org.grails.datastore.mapping.mongo</a>
+</dt><dd><div class="block">What an index build applied, as its summary line reports it. </div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/cfg/PropertyConfig.html#indexColumn" title="Property in PropertyConfig">indexColumn</a></span> - Property in <a href="org/grails/orm/hibernate/cfg/PropertyConfig.html">PropertyConfig</a>
</dt><dd> <div class="block">The column used to produce the index for index based collections (lists and maps)</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/neo4j/engine/Neo4jAssociationQueryExecutor.html#indexedEntity" title="Property in Neo4jAssociationQueryExecutor">indexedEntity</a></span> - Property in <a href="org/grails/datastore/gorm/neo4j/engine/Neo4jAssociationQueryExecutor.html">Neo4jAssociationQueryExecutor</a>
@@ -14619,6 +14632,8 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block"> <DL><DT><B>Returns:</B></DT><DD>The minimum size</DD></DL></div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/query/PropertyReference.html#minus(java.lang.Number)" title="Method in PropertyReference">minus(java.lang.Number)</a></span> - Method in <a href="org/grails/orm/hibernate/query/PropertyReference.html">PropertyReference</a>
</dt><dd> <div class="block"></div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/MissingIndex.html" title="Record in org.grails.datastore.mapping.mongo">MissingIndex</a></span> - Record in <a href="./org/grails/datastore/mapping/mongo/package-summary.html">org.grails.datastore.mapping.mongo</a>
+</dt><dd><div class="block">An index a domain class declares that its collection does not have.</div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/connections/HibernateConnectionSourceSettings.HibernateSettings.FlushSettings.html#mode" title="Property in HibernateConnectionSourceSettings.HibernateSettings.FlushSettings">mode</a></span> - Property in <a href="org/grails/orm/hibernate/connections/HibernateConnectionSourceSettings.HibernateSettings.FlushSettings.html">HibernateConnectionSourceSettings.HibernateSettings.FlushSettings</a>
</dt><dd> <div class="block">The default flush mode</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/mapping/multitenancy/MultiTenancySettings.html#mode" title="Property in MultiTenancySettings">mode</a></span> - Property in <a href="org/grails/datastore/mapping/multitenancy/MultiTenancySettings.html">MultiTenancySettings</a>
@@ -20720,6 +20735,8 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/grails/datastore/mapping/core/DatastoreUtils.html#unbindSession(org.grails.datastore.mapping.core.Session)" title="Method in DatastoreUtils">unbindSession(org.grails.datastore.mapping.core.Session)</a></span> - Method in <a href="org/grails/datastore/mapping/core/DatastoreUtils.html">DatastoreUtils</a>
</dt><dd> <div class="block">Unbinds and closes a session. </div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/UndeclaredIndex.html" title="Record in org.grails.datastore.mapping.mongo">UndeclaredIndex</a></span> - Record in <a href="./org/grails/datastore/mapping/mongo/package-summary.html">org.grails.datastore.mapping.mongo</a>
+</dt><dd><div class="block">An index on a collection that domain classes map, whose keys none of those domain classes declares.</div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/cfg/domainbinding/binder/GrailsDomainBinder.html#UNDERSCORE" title="Field in GrailsDomainBinder">UNDERSCORE</a></span> - Field in <a href="org/grails/orm/hibernate/cfg/domainbinding/binder/GrailsDomainBinder.html">GrailsDomainBinder</a>
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/cfg/domainbinding/secondpass/UnidirectionalOneToManyBinder.html" title="Class in org.grails.orm.hibernate.cfg.domainbinding.secondpass">UnidirectionalOneToManyBinder</a></span> - Class in <a href="./org/grails/orm/hibernate/cfg/domainbinding/secondpass/package-summary.html">org.grails.orm.hibernate.cfg.domainbinding.secondpass</a>
diff --git a/docs/snapshot/grails-data/hibernate5/api/org/grails/datastore/mapping/mongo/IndexBuildResult.html b/docs/snapshot/grails-data/hibernate5/api/org/grails/datastore/mapping/mongo/IndexBuildResult.html
new file mode 100644
index 000000000000..21d3046938f9
--- /dev/null
+++ b/docs/snapshot/grails-data/hibernate5/api/org/grails/datastore/mapping/mongo/IndexBuildResult.html
@@ -0,0 +1,240 @@
+<!--
+
+ 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.
+
+-->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!-- **************************************************************** -->
+<!-- * PLEASE KEEP COMPLICATED EXPRESSIONS OUT OF THESE TEMPLATES, * -->
+<!-- * i.e. only iterate & print data where possible. Thanks, Jez. * -->
+<!-- **************************************************************** -->
+
+<html>
+<head>
+ <!-- Generated by groovydoc (5.1.3) -->
+ <title>IndexBuildResult (GORM for Hibernate 5 - 8.0.0-SNAPSHOT)</title>
+
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="icon">
+ <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
+
+<body class="center">
+<script type="text/javascript"><!--
+if (location.href.indexOf('is-external=true') == -1) {
+ parent.document.title="IndexBuildResult (GORM for Hibernate 5 - 8.0.0-SNAPSHOT)";
+}
+//-->
+</script>
+<noscript>
+ <div>JavaScript is disabled on your browser.</div>
+</noscript>
+<!-- ========= START OF TOP NAVBAR ======= -->
+<div class="topNav"><a name="navbar_top">
+ <!-- -->
+</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/IndexBuildResult" target="_top">Frames</a></li>
+ <li><a href="IndexBuildResult.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <a name="skip-navbar_top">
+ <!-- -->
+ </a></div>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<!-- ======== START OF CLASS DATA ======== -->
+<div class="header">
+
+ <div class="subTitle">Package: <strong>org.grails.datastore.mapping.mongo</strong></div>
+
+ <h2 title="[Java] Record IndexBuildResult" class="title">[Java] Record IndexBuildResult</h2>
+</div>
+<div class="contentContainer">
+<ul class="inheritance">
+<li><ul class="inheritance"></ul></li><li>org.grails.datastore.mapping.mongo.IndexBuildResult
+</ul>
+<div class="description">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+ <!-- todo: direct known subclasses -->
+ <hr>
+
+<pre>public record IndexBuildResult</pre>
+
+ <p> What an index build applied, as its summary line reports it. The counts are of index declarations, so
+ declaring the same keys twice can count one created and one already present.
+ <DL><DT><B>Parameters:</B></DT><DD><code>database</code> - the database the build was for</DD><DD><code>domainClasses</code> - the domain classes considered, including those that declare no indexes</DD><DD><code>created</code> - declarations whose index did not exist before the build</DD><DD><code>recreated</code> - indexes dropped and built again for <CODE>recreateOnConflict</CODE></DD><DD><code>alreadyPresent</code> - declarations whose index already existed, [...]
+ in place</DD><DD><code>unclassified</code> - declarations applied on a collection whose existing indexes could not be listed, so
+ neither created nor already present</DD><DD><code>failures</code> - declarations that could not be applied; each is logged as it fails</DD><DD><code>elapsedMillis</code> - how long the build took</DD></DL><DL><DT><B>See Also:</B></DT><DD><a href='../../../../../org/grails/datastore/mapping/mongo/MongoDatastore.html#buildIndexAsync()' title='MongoDatastore.buildIndexAsync'>MongoDatastore.buildIndexAsync</a></DD></DL></p>
+
+ </li>
+ </ul>
+</div>
+
+<div class="summary">
+ <ul class="blockList">
+ <li class="blockList">
+ <!-- =========== NESTED CLASS SUMMARY =========== -->
+
+
+ <!-- =========== ENUM CONSTANT SUMMARY =========== -->
+
+ <!-- =========== FIELD SUMMARY =========== -->
+
+
+ <!-- =========== PROPERTY SUMMARY =========== -->
+
+
+ <!-- =========== ELEMENT SUMMARY =========== -->
+
+
+
+
+
+ <!-- ========== METHOD SUMMARY =========== -->
+ <ul class="blockList">
+
+ <li class="blockList"><a name="method_summary"><!-- --></a>
+ <h3>Inherited Methods Summary</h3>
+ <ul class="blockList">
+ <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Inherited Methods Summary table">
+ <caption><span>Inherited Methods</span><span class="tabEnd"> </span></caption>
+ <tr>
+ <th class="colFirst" scope="col">Methods inherited from class</th>
+ <th class="colLast" scope="col">Name</th>
+ </tr>
+
+ <tr class="altColor">
+ <td class="colFirst"><code>class java.lang.Object</code></td>
+ <td class="colLast"><code>java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int)</code></td>
+ </tr>
+ </table>
+ </ul>
+ </li>
+
+ </ul>
+
+ </li>
+ </ul>
+</div>
+
+<div class="details">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+
+
+
+
+
+
+
+
+
+
+ </li>
+ </ul>
+</div>
+
+<!-- ========= END OF CLASS DATA ========= -->
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<div class="bottomNav"><a name="navbar_bottom">
+ <!-- -->
+</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/IndexBuildResult" target="_top">Frames</a></li>
+ <li><a href="IndexBuildResult.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <p><!-- Matomo -->
+<script>
+ var _paq = window._paq = window._paq || [];
+ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+ _paq.push(["setDoNotTrack", true]);
+ _paq.push(["disableCookies"]);
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="https://analytics.apache.org/";
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
+ _paq.push(['setSiteId', '79']);
+ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+ g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ })();
+</script>
+<!-- End Matomo Code --></p>
+ <a name="skip-navbar_bottom">
+ <!-- -->
+ </a>
+ </div>
+</div>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+</body>
+</html>
diff --git a/docs/snapshot/grails-data/hibernate5/api/org/grails/datastore/mapping/mongo/MissingIndex.html b/docs/snapshot/grails-data/hibernate5/api/org/grails/datastore/mapping/mongo/MissingIndex.html
new file mode 100644
index 000000000000..925367f3eaa9
--- /dev/null
+++ b/docs/snapshot/grails-data/hibernate5/api/org/grails/datastore/mapping/mongo/MissingIndex.html
@@ -0,0 +1,237 @@
+<!--
+
+ 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.
+
+-->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!-- **************************************************************** -->
+<!-- * PLEASE KEEP COMPLICATED EXPRESSIONS OUT OF THESE TEMPLATES, * -->
+<!-- * i.e. only iterate & print data where possible. Thanks, Jez. * -->
+<!-- **************************************************************** -->
+
+<html>
+<head>
+ <!-- Generated by groovydoc (5.1.3) -->
+ <title>MissingIndex (GORM for Hibernate 5 - 8.0.0-SNAPSHOT)</title>
+
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="icon">
+ <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
+
+<body class="center">
+<script type="text/javascript"><!--
+if (location.href.indexOf('is-external=true') == -1) {
+ parent.document.title="MissingIndex (GORM for Hibernate 5 - 8.0.0-SNAPSHOT)";
+}
+//-->
+</script>
+<noscript>
+ <div>JavaScript is disabled on your browser.</div>
+</noscript>
+<!-- ========= START OF TOP NAVBAR ======= -->
+<div class="topNav"><a name="navbar_top">
+ <!-- -->
+</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/MissingIndex" target="_top">Frames</a></li>
+ <li><a href="MissingIndex.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <a name="skip-navbar_top">
+ <!-- -->
+ </a></div>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<!-- ======== START OF CLASS DATA ======== -->
+<div class="header">
+
+ <div class="subTitle">Package: <strong>org.grails.datastore.mapping.mongo</strong></div>
+
+ <h2 title="[Java] Record MissingIndex" class="title">[Java] Record MissingIndex</h2>
+</div>
+<div class="contentContainer">
+<ul class="inheritance">
+<li><ul class="inheritance"></ul></li><li>org.grails.datastore.mapping.mongo.MissingIndex
+</ul>
+<div class="description">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+ <!-- todo: direct known subclasses -->
+ <hr>
+
+<pre>public record MissingIndex</pre>
+
+ <p> An index a domain class declares that its collection does not have.
+ <DL><DT><B>Parameters:</B></DT><DD><code>database</code> - the database the collection is in</DD><DD><code>collection</code> - the collection the index belongs on</DD><DD><code>domainClass</code> - the name of the domain class declaring it, the first of them if several do</DD><DD><code>key</code> - the declared key pattern</DD><DD><code>options</code> - the options declared with it, such as <CODE>unique</CODE> or <CODE>expireAfterSeconds</CODE></DD></DL><DL><DT><B> [...]
+
+ </li>
+ </ul>
+</div>
+
+<div class="summary">
+ <ul class="blockList">
+ <li class="blockList">
+ <!-- =========== NESTED CLASS SUMMARY =========== -->
+
+
+ <!-- =========== ENUM CONSTANT SUMMARY =========== -->
+
+ <!-- =========== FIELD SUMMARY =========== -->
+
+
+ <!-- =========== PROPERTY SUMMARY =========== -->
+
+
+ <!-- =========== ELEMENT SUMMARY =========== -->
+
+
+
+
+
+ <!-- ========== METHOD SUMMARY =========== -->
+ <ul class="blockList">
+
+ <li class="blockList"><a name="method_summary"><!-- --></a>
+ <h3>Inherited Methods Summary</h3>
+ <ul class="blockList">
+ <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Inherited Methods Summary table">
+ <caption><span>Inherited Methods</span><span class="tabEnd"> </span></caption>
+ <tr>
+ <th class="colFirst" scope="col">Methods inherited from class</th>
+ <th class="colLast" scope="col">Name</th>
+ </tr>
+
+ <tr class="altColor">
+ <td class="colFirst"><code>class java.lang.Object</code></td>
+ <td class="colLast"><code>java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int)</code></td>
+ </tr>
+ </table>
+ </ul>
+ </li>
+
+ </ul>
+
+ </li>
+ </ul>
+</div>
+
+<div class="details">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+
+
+
+
+
+
+
+
+
+
+ </li>
+ </ul>
+</div>
+
+<!-- ========= END OF CLASS DATA ========= -->
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<div class="bottomNav"><a name="navbar_bottom">
+ <!-- -->
+</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/MissingIndex" target="_top">Frames</a></li>
+ <li><a href="MissingIndex.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <p><!-- Matomo -->
+<script>
+ var _paq = window._paq = window._paq || [];
+ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+ _paq.push(["setDoNotTrack", true]);
+ _paq.push(["disableCookies"]);
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="https://analytics.apache.org/";
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
+ _paq.push(['setSiteId', '79']);
+ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+ g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ })();
+</script>
+<!-- End Matomo Code --></p>
+ <a name="skip-navbar_bottom">
+ <!-- -->
+ </a>
+ </div>
+</div>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+</body>
+</html>
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 48258669d27a..6adb20832fd4 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
@@ -568,328 +568,361 @@ implements <a href='../../../../../MappingContextListener.html'>MappingContextLi
</tr>
<tr class="rowColor">
+ <td class="colFirst"><code></code></td>
+ <td class="colLast"><code>public java.util.concurrent.CompletableFuture<<a href='../../../../../org/grails/datastore/mapping/mongo/IndexBuildResult.html' title='IndexBuildResult'>IndexBuildResult</a>></code></td>
+ <td class="colLast"><code><strong><a href="#buildIndexAsync()">buildIndexAsync</a></strong>()</code><br>Runs the same build as <a href='#buildIndex()'>buildIndex()</a> on this connection's background index build thread, whatever
+ <CODE>grails.mongodb.buildIndexesAsync</CODE> says, and returns at once with a handle on its outcome.</td>
+ </tr>
+
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#close()">close</a></strong>()</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected static <a href='../../../../../org/grails/datastore/mapping/core/connections/ConnectionSources.html' title='ConnectionSources'>ConnectionSources</a><MongoClient, <a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html' title='MongoConnectionSourceSettings'>MongoConnectionSourceSettings</a>></code></td>
<td class="colLast"><code><strong><a href="#createDefaultConnectionSources(com.mongodb.client.MongoClient, org.springframework.core.env.PropertyResolver, org.grails.datastore.mapping.mongo.config.MongoMappingContext, boolean)">createDefaultConnectionSources</a></strong>(<a href='../../../../../com.mongodb.client.MongoClient.html'>MongoClient</a> mongoClient, org.springframework.core.env.PropertyResolver configuration, <a href='../../../../../org/grails/datasto [...]
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected static <a href='../../../../../org/grails/datastore/mapping/mongo/config/MongoMappingContext.html'>MongoMappingContext</a></code></td>
<td class="colLast"><code><strong><a href="#createMappingContext(ConnectionSources, java.lang.Class)">createMappingContext</a></strong>(<a href='../../../../../org/grails/datastore/mapping/core/connections/ConnectionSources.html' title='ConnectionSources'>ConnectionSources</a><MongoClient, <a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html' title='MongoConnectionSourceSettings'>MongoConnectionSourceSett [...]
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected static <a href='../../../../../org/grails/datastore/mapping/mongo/config/MongoMappingContext.html'>MongoMappingContext</a></code></td>
<td class="colLast"><code><strong><a href="#createMappingContext(org.springframework.core.env.PropertyResolver, java.lang.Class)">createMappingContext</a></strong>(org.springframework.core.env.PropertyResolver configuration, java.lang.Class classes)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected static <a href='../../../../../com.mongodb.client.MongoClient.html'>MongoClient</a></code></td>
<td class="colLast"><code><strong><a href="#createMongoClient(org.springframework.core.env.PropertyResolver, com.mongodb.MongoClientSettings.Builder, org.grails.datastore.mapping.mongo.config.MongoMappingContext)">createMongoClient</a></strong>(org.springframework.core.env.PropertyResolver configuration, <a href='../../../../../com.mongodb.MongoClientSettings.Builder.html'>Builder</a> mongoOptions, <a href='../../../../../org/grails/datastore/mapping/mongo/con [...]
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected <a href='../../../../../org/grails/datastore/mapping/core/Session.html'>Session</a></code></td>
<td class="colLast"><code><strong><a href="#createSession(org.springframework.core.env.PropertyResolver)">createSession</a></strong>(org.springframework.core.env.PropertyResolver connDetails)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected <a href='../../../../../org/grails/datastore/mapping/core/Session.html'>Session</a></code></td>
<td class="colLast"><code><strong><a href="#createStatelessSession(org.springframework.core.env.PropertyResolver)">createStatelessSession</a></strong>(org.springframework.core.env.PropertyResolver connectionDetails)</code><br></td>
</tr>
+ <tr class="rowColor">
+ <td class="colFirst"><code></code></td>
+ <td class="colLast"><code>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>></code></td>
+ <td class="colLast"><code><strong><a href="#dropUndeclaredIndexes()">dropUndeclaredIndexes</a></strong>()</code><br>Drops every index that <a href='#findUndeclaredIndexes()'>findUndeclaredIndexes()</a> reports.</td>
+ </tr>
+
<tr class="altColor">
+ <td class="colFirst"><code></code></td>
+ <td class="colLast"><code>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>></code></td>
+ <td class="colLast"><code><strong><a href="#dropUndeclaredIndexes(List)">dropUndeclaredIndexes</a></strong>(java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>> indexes)</code><br>Drops the given indexes: those <a href='#findUndeclaredIndexes()'>findUndeclaredIndexes()</a> reported, once they have been reviewed.</td>
+ </tr>
+
+ <tr class="rowColor">
+ <td class="colFirst"><code></code></td>
+ <td class="colLast"><code>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/MissingIndex.html' title='MissingIndex'>MissingIndex</a>></code></td>
+ <td class="colLast"><code><strong><a href="#findMissingIndexes()">findMissingIndexes</a></strong>()</code><br>Lists the indexes the domain classes declare that their collections do not have, on the collections
+ whose declared indexes <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.</td>
+ </tr>
+
+ <tr class="altColor">
+ <td class="colFirst"><code></code></td>
+ <td class="colLast"><code>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>></code></td>
+ <td class="colLast"><code><strong><a href="#findUndeclaredIndexes()">findUndeclaredIndexes</a></strong>()</code><br>Lists the indexes that no domain class declares, on the collections whose declared indexes
+ <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.</td>
+ </tr>
+
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/gorm/events/ConfigurableApplicationEventPublisher.html'>ConfigurableApplicationEventPublisher</a></code></td>
<td class="colLast"><code><strong><a href="#getApplicationEventPublisher()">getApplicationEventPublisher</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The <a href='../../../../../org/grails/datastore/gorm/events/ConfigurableApplicationEventPublisher.html' title='ConfigurableApplicationEventPublisher'>ConfigurableApplicationEventPublisher</a> instance used by this datastore</DD></DL></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/gorm/events/AutoTimestampEventListener.html'>AutoTimestampEventListener</a></code></td>
<td class="colLast"><code><strong><a href="#getAutoTimestampEventListener()">getAutoTimestampEventListener</a></strong>()</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org.bson.codecs.configuration.CodecRegistry.html'>CodecRegistry</a></code></td>
<td class="colLast"><code><strong><a href="#getCodecRegistry()">getCodecRegistry</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The CodecRegistry</DD></DL></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public com.mongodb.client.MongoCollection<Document></code></td>
<td class="colLast"><code><strong><a href="#getCollection(org.grails.datastore.mapping.model.PersistentEntity)">getCollection</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br>Obtain the raw com.mongodb.client.MongoCollection for the given entity</td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public java.lang.String</code></td>
<td class="colLast"><code><strong><a href="#getCollectionName(org.grails.datastore.mapping.model.PersistentEntity)">getCollectionName</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br>Gets the default collection name for the given entity</td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/core/connections/ConnectionSources.html' title='ConnectionSources'>ConnectionSources</a><MongoClient, <a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html' title='MongoConnectionSourceSettings'>MongoConnectionSourceSettings</a>></code></td>
<td class="colLast"><code><strong><a href="#getConnectionSources()">getConnectionSources</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The <a href='../../../../../org/grails/datastore/mapping/core/connections/ConnectionSources.html' title='ConnectionSources'>ConnectionSources</a> for this datastore</DD></DL></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public java.lang.String</code></td>
<td class="colLast"><code><strong><a href="#getDatabaseName(org.grails.datastore.mapping.model.PersistentEntity)">getDatabaseName</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/mongo/MongoDatastore.html'>MongoDatastore</a></code></td>
<td class="colLast"><code><strong><a href="#getDatastoreForConnection(java.lang.String)">getDatastoreForConnection</a></strong>(java.lang.String connectionName)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/core/Datastore.html'>Datastore</a></code></td>
<td class="colLast"><code><strong><a href="#getDatastoreForConnection(java.lang.String)">getDatastoreForConnection</a></strong>(java.lang.String connectionName)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/mongo/MongoDatastore.html'>MongoDatastore</a></code></td>
<td class="colLast"><code><strong><a href="#getDatastoreForTenantId(java.io.Serializable)">getDatastoreForTenantId</a></strong>(java.io.Serializable tenantId)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public java.lang.String</code></td>
<td class="colLast"><code><strong><a href="#getDefaultDatabase()">getDefaultDatabase</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The default database name</DD></DL></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public jakarta.persistence.FlushModeType</code></td>
<td class="colLast"><code><strong><a href="#getDefaultFlushMode()">getDefaultFlushMode</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The default flush mode</DD></DL></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code><D></code></td>
<td class="colLast"><code>protected <a href='../../../../../org/grails/datastore/gorm/GormInstanceApi.html' title='GormInstanceApi'>GormInstanceApi</a><D></code></td>
<td class="colLast"><code><strong><a href="#getInstanceApi(Class, java.lang.String)">getInstanceApi</a></strong>(java.lang.Class<D> cls, java.lang.String qualifier)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/mongo/config/MongoMappingContext.html'>MongoMappingContext</a></code></td>
<td class="colLast"><code><strong><a href="#getMappingContext()">getMappingContext</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The mapping context</DD></DL></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../com.mongodb.client.MongoClient.html'>MongoClient</a></code></td>
<td class="colLast"><code><strong><a href="#getMongoClient()">getMongoClient</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The MongoClient instance</DD></DL></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/multitenancy/MultiTenancySettings.MultiTenancyMode.html'>MultiTenancyMode</a></code></td>
<td class="colLast"><code><strong><a href="#getMultiTenancyMode()">getMultiTenancyMode</a></strong>()</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.html'>PersistentEntityCodec</a></code></td>
<td class="colLast"><code><strong><a href="#getPersistentEntityCodec(org.grails.datastore.mapping.model.PersistentEntity)">getPersistentEntityCodec</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br>Obtains a <a href='../../../../../org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.html' title='PersistentEntityCodec'>PersistentEntityCodec</a> for the given e [...]
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.html'>PersistentEntityCodec</a></code></td>
<td class="colLast"><code><strong><a href="#getPersistentEntityCodec(java.lang.Class)">getPersistentEntityCodec</a></strong>(java.lang.Class entityClass)</code><br>Obtains a <a href='../../../../../org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.html' title='PersistentEntityCodec'>PersistentEntityCodec</a> for the given entity</td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public int</code></td>
<td class="colLast"><code><strong><a href="#getPhase()">getPhase</a></strong>()</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code><D></code></td>
<td class="colLast"><code>protected MongoStaticApi<D></code></td>
<td class="colLast"><code><strong><a href="#getStaticApi(Class, java.lang.String)">getStaticApi</a></strong>(java.lang.Class<D> cls, java.lang.String qualifier)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/multitenancy/TenantResolver.html'>TenantResolver</a></code></td>
<td class="colLast"><code><strong><a href="#getTenantResolver()">getTenantResolver</a></strong>()</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public org.springframework.transaction.PlatformTransactionManager</code></td>
<td class="colLast"><code><strong><a href="#getTransactionManager()">getTransactionManager</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The transaction manager</DD></DL></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code><D></code></td>
<td class="colLast"><code>protected <a href='../../../../../org/grails/datastore/gorm/GormValidationApi.html' title='GormValidationApi'>GormValidationApi</a><D></code></td>
<td class="colLast"><code><strong><a href="#getValidationApi(Class, java.lang.String)">getValidationApi</a></strong>(java.lang.Class<D> cls, java.lang.String qualifier)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected <a href='../../../../../org/grails/datastore/gorm/mongo/MongoGormEnhancer.html'>MongoGormEnhancer</a></code></td>
<td class="colLast"><code><strong><a href="#initialize(org.grails.datastore.mapping.mongo.connections.MongoConnectionSourceSettings)">initialize</a></strong>(<a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html'>MongoConnectionSourceSettings</a> settings)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected <a href='../../../../../org/grails/datastore/gorm/mongo/MongoGormEnhancer.html'>MongoGormEnhancer</a></code></td>
<td class="colLast"><code><strong><a href="#initialize(org.grails.datastore.mapping.mongo.connections.MongoConnectionSourceSettings)">initialize</a></strong>(<a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html'>MongoConnectionSourceSettings</a> settings)</code><br>Runs the initialization sequence</td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="#initializeIndices(org.grails.datastore.mapping.model.PersistentEntity)">initializeIndices</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br>Indexes any properties that are mapped with index:true. </td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public boolean</code></td>
<td class="colLast"><code><strong><a href="#isBuildIndexes()">isBuildIndexes</a></strong>()</code><br>Whether GORM creates and reconciles the indexes declared in the domain class mapping blocks by itself:
when the datastore starts, and for connections and domain classes added later. </td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public boolean</code></td>
<td class="colLast"><code><strong><a href="#isBuildIndexesAsync()">isBuildIndexesAsync</a></strong>()</code><br>Whether index builds run on a background thread instead of blocking the thread that starts them - the
one GORM starts on startup, and any <a href='#buildIndex()'>buildIndex()</a> the application calls. </td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public boolean</code></td>
<td class="colLast"><code><strong><a href="#isRunning()">isRunning</a></strong>()</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public boolean</code></td>
<td class="colLast"><code><strong><a href="#isSchemaless()">isSchemaless</a></strong>()</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public boolean</code></td>
<td class="colLast"><code><strong><a href="#isTransactionsEnabled()">isTransactionsEnabled</a></strong>()</code><br>Whether GORM should use real MongoDB multi-document transactions (a server-side
<CODE>ClientSession</CODE>) for transactional operations. </td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#newConnectionSource(ConnectionSource)">newConnectionSource</a></strong>(<a href='../../../../../org/grails/datastore/mapping/core/connections/ConnectionSource.html' title='ConnectionSource'>ConnectionSource</a><MongoClient, <a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html' title='MongoConnectionSourceSettings'>MongoConnectionSourceSettings</a>> connection [...]
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#persistentEntityAdded(org.grails.datastore.mapping.model.PersistentEntity)">persistentEntityAdded</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#persistentEntityAdded(org.grails.datastore.mapping.model.PersistentEntity)">persistentEntityAdded</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="#registerAllEntitiesWithEnhancer()">registerAllEntitiesWithEnhancer</a></strong>()</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="#registerEntity(org.grails.datastore.mapping.model.PersistentEntity)">registerEntity</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="#registerEventListeners(org.grails.datastore.gorm.events.ConfigurableApplicationEventPublisher)">registerEventListeners</a></strong>(<a href='../../../../../org/grails/datastore/gorm/events/ConfigurableApplicationEventPublisher.html'>ConfigurableApplicationEventPublisher</a> eventPublisher)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public java.io.Serializable</code></td>
<td class="colLast"><code><strong><a href="#resolveTenantIdentifier()">resolveTenantIdentifier</a></strong>()</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public java.lang.Iterable<java.io.Serializable></code></td>
<td class="colLast"><code><strong><a href="#resolveTenantIds()">resolveTenantIds</a></strong>()</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#setCodecProviders(List)">setCodecProviders</a></strong>(java.util.List<CodecProvider> codecProviders)</code><br>Sets any additional codec providers</td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#setCodecRegistries(List)">setCodecRegistries</a></strong>(java.util.List<CodecRegistry> codecRegistries)</code><br>Sets any additional codec registries</td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#setCodecs(List)">setCodecs</a></strong>(java.util.List<Codec<?>> codecs)</code><br>Sets any additional codecs</td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#setMessageSource(List)">setMessageSource</a></strong>(java.util.List<org.springframework.context.MessageSource> messageSources)</code><br>The message source used for validation messages</td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#setMessageSource(org.springframework.context.MessageSource)">setMessageSource</a></strong>(org.springframework.context.MessageSource messageSource)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#start()">start</a></strong>()</code><br>Builds a replacement for each MongoClient that <a href='#stop()'>stop()</a> closed, using the
same factory the original was built with, so settings applied at startup still apply. </td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#stop()">stop</a></strong>()</code><br>Closes the MongoClient of every connection, so the process can be checkpointed.</td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code><T1></code></td>
<td class="colLast"><code>public <a href='../../../../../T1.html'>T1</a></code></td>
<td class="colLast"><code><strong><a href="#withNewSession(java.io.Serializable, Closure)">withNewSession</a></strong>(java.io.Serializable tenantId, groovy.lang.Closure<T1> callable)</code><br></td>
@@ -1531,11 +1564,37 @@ implements <a href='../../../../../MappingContextListener.html'>MappingContextLi
<p>Each index is created by a command that the server answers only once the index has been built,
so this blocks the calling thread for as long as MongoDB takes to build every declared index. With
<CODE>grails.mongodb.buildIndexesAsync</CODE> enabled the work goes to a background thread and this
- returns immediately instead.
+ returns immediately instead. <a href='#buildIndexAsync()'>buildIndexAsync()</a> runs it in the background whatever the setting,
+ and reports the outcome to its caller. Builds on a connection run one at a time, wherever they run: a
+ build on the calling thread first waits for one running in the background, and the other way round, and a
+ domain class registered after startup is indexed once neither is running.
</p>
</li>
</ul>
+ <a name="buildIndexAsync()"><!-- --></a>
+ <ul class="blockListLast">
+ <li class="blockList">
+ <h4>public java.util.concurrent.CompletableFuture<<a href='../../../../../org/grails/datastore/mapping/mongo/IndexBuildResult.html' title='IndexBuildResult'>IndexBuildResult</a>> <strong>buildIndexAsync</strong>()</h4>
+ <p> Runs the same build as <a href='#buildIndex()'>buildIndex()</a> on this connection's background index build thread, whatever
+ <CODE>grails.mongodb.buildIndexesAsync</CODE> says, and returns at once with a handle on its outcome.
+
+ <p>The future completes with the build's <a href='../../../../../org/grails/datastore/mapping/mongo/IndexBuildResult.html' title='IndexBuildResult'>IndexBuildResult</a> once every declaration has been applied,
+ including when some of them failed: those are counted in <a href='../../../../../org/grails/datastore/mapping/mongo/IndexBuildResult.html#failures()' title='IndexBuildResult.failures'>IndexBuildResult.failures</a> and logged
+ as they happen. It completes exceptionally with the exception that stopped the build partway, such as a
+ lost connection or a write concern the server could not satisfy. Created and already-present indexes are always told apart, whatever the log level.
+
+ <p>Builds on a connection run one at a time, so a build requested while another is running waits for it,
+ including one running on a caller's thread with <a href='#buildIndex()'>buildIndex()</a>, or one indexing a domain class
+ registered after startup.
+ Cancelling the future does not stop the build. If the datastore is stopped or closed, the future completes
+ exceptionally at once, and a build that stopping or closing the datastore cuts short completes
+ exceptionally too; a restart runs the cut-short build again, without a future. Each named connection
+ builds its own domain classes: call this on <a href='#getDatastoreForConnection(java.lang.String)'>getDatastoreForConnection(String)</a> for those.
+ <DL><DT><B>Returns:</B></DT><DD>the outcome of the build</DD></DL></p>
+ </li>
+ </ul>
+
<a name="close()"><!-- --></a>
<ul class="blockListLast">
<li class="blockList">
@@ -1596,6 +1655,75 @@ implements <a href='../../../../../MappingContextListener.html'>MappingContextLi
</li>
</ul>
+ <a name="dropUndeclaredIndexes()"><!-- --></a>
+ <ul class="blockListLast">
+ <li class="blockList">
+ <h4>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>> <strong>dropUndeclaredIndexes</strong>()</h4>
+ <p> Drops every index that <a href='#findUndeclaredIndexes()'>findUndeclaredIndexes()</a> reports.
+
+ <p>Run this deliberately, once every instance of the application runs the release whose domain classes
+ declare the indexes to keep. An instance still on an earlier release does not declare what a later
+ release added, nor an index created by hand ahead of a deployment, so to it those indexes are
+ undeclared and this drops them.
+ <DL><DT><B>Returns:</B></DT><DD>the indexes dropped</DD></DL></p>
+ </li>
+ </ul>
+
+ <a name="dropUndeclaredIndexes(List)"><!-- --></a>
+ <ul class="blockListLast">
+ <li class="blockList">
+ <h4>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>> <strong>dropUndeclaredIndexes</strong>(java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>> indexes)</h4>
+ <p> Drops the given indexes: those <a href='#findUndeclaredIndexes()'>findUndeclaredIndexes()</a> reported, once they have been reviewed.
+
+ <p>Each index is checked again before it is dropped, since the reviewed list can be older than what is on
+ the server: one is dropped only while the index of that name is on the keys reviewed, its collection is
+ mapped on this datastore's connection, and no domain class mapped to it declares those keys. An index that
+ no longer exists, or whose collection no longer does, is skipped, and so is one that fails a check, which
+ is logged at <CODE>WARN</CODE>.
+ <DL><DT><B>Parameters:</B></DT><DD><code>indexes</code> - the indexes to drop</DD></DL><DL><DT><B>Returns:</B></DT><DD>the indexes dropped</DD></DL></p>
+ </li>
+ </ul>
+
+ <a name="findMissingIndexes()"><!-- --></a>
+ <ul class="blockListLast">
+ <li class="blockList">
+ <h4>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/MissingIndex.html' title='MissingIndex'>MissingIndex</a>> <strong>findMissingIndexes</strong>()</h4>
+ <p> Lists the indexes the domain classes declare that their collections do not have, on the collections
+ whose declared indexes <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.
+
+ <p>A declared index is present when its collection has an index on the same key pattern, the same fields
+ in the same order, whatever its name and options: an option that differs is the build's to reconcile.
+ A text index is present when one indexes the same text fields, in any order, with the same keys before and
+ after them, whatever its weights. Keys that several classes mapped to one collection declare are reported
+ once. Nothing is changed:
+ <a href='#buildIndex()'>buildIndex()</a> or <a href='#buildIndexAsync()'>buildIndexAsync()</a> creates them. Each named connection has its own
+ domain classes, so call this on <a href='#getDatastoreForConnection(java.lang.String)'>getDatastoreForConnection(String)</a> for those.
+ <DL><DT><B>Returns:</B></DT><DD>the missing indexes, collection by collection, in the order the domain classes declare them</DD></DL></p>
+ </li>
+ </ul>
+
+ <a name="findUndeclaredIndexes()"><!-- --></a>
+ <ul class="blockListLast">
+ <li class="blockList">
+ <h4>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>> <strong>findUndeclaredIndexes</strong>()</h4>
+ <p> Lists the indexes that no domain class declares, on the collections whose declared indexes
+ <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.
+
+ <p>An index is declared when a domain class mapped to the same collection declares its key pattern, the
+ same fields in the same order, with <CODE>compoundIndex</CODE>, <CODE>index</CODE> or a property's
+ <CODE>index: true</CODE>. Its name and options do not matter. A text index is declared when a class declares
+ text on the same fields, in any order, with the same keys before and after them; its weights do not
+ matter. The <CODE>_id</CODE> index is never reported, and
+ neither is any index on a collection that no domain class maps. An index that an
+ <a href='#initializeIndices(org.grails.datastore.mapping.model.PersistentEntity)'>initializeIndices(PersistentEntity)</a> override creates by itself is not a declaration, so it is
+ reported.
+
+ <p>Nothing is changed: see <a href='#dropUndeclaredIndexes()'>dropUndeclaredIndexes()</a>. Each named connection has its own domain
+ classes, so call this on <a href='#getDatastoreForConnection(java.lang.String)'>getDatastoreForConnection(String)</a> for those.
+ <DL><DT><B>Returns:</B></DT><DD>the undeclared indexes, collection by collection, in the order the server lists them</DD></DL></p>
+ </li>
+ </ul>
+
<a name="getApplicationEventPublisher()"><!-- --></a>
<ul class="blockListLast">
<li class="blockList">
diff --git a/docs/snapshot/grails-data/hibernate5/api/org/grails/datastore/mapping/mongo/UndeclaredIndex.html b/docs/snapshot/grails-data/hibernate5/api/org/grails/datastore/mapping/mongo/UndeclaredIndex.html
new file mode 100644
index 000000000000..9416aa02f683
--- /dev/null
+++ b/docs/snapshot/grails-data/hibernate5/api/org/grails/datastore/mapping/mongo/UndeclaredIndex.html
@@ -0,0 +1,237 @@
+<!--
+
+ 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.
+
+-->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!-- **************************************************************** -->
+<!-- * PLEASE KEEP COMPLICATED EXPRESSIONS OUT OF THESE TEMPLATES, * -->
+<!-- * i.e. only iterate & print data where possible. Thanks, Jez. * -->
+<!-- **************************************************************** -->
+
+<html>
+<head>
+ <!-- Generated by groovydoc (5.1.3) -->
+ <title>UndeclaredIndex (GORM for Hibernate 5 - 8.0.0-SNAPSHOT)</title>
+
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="icon">
+ <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
+
+<body class="center">
+<script type="text/javascript"><!--
+if (location.href.indexOf('is-external=true') == -1) {
+ parent.document.title="UndeclaredIndex (GORM for Hibernate 5 - 8.0.0-SNAPSHOT)";
+}
+//-->
+</script>
+<noscript>
+ <div>JavaScript is disabled on your browser.</div>
+</noscript>
+<!-- ========= START OF TOP NAVBAR ======= -->
+<div class="topNav"><a name="navbar_top">
+ <!-- -->
+</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/UndeclaredIndex" target="_top">Frames</a></li>
+ <li><a href="UndeclaredIndex.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <a name="skip-navbar_top">
+ <!-- -->
+ </a></div>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<!-- ======== START OF CLASS DATA ======== -->
+<div class="header">
+
+ <div class="subTitle">Package: <strong>org.grails.datastore.mapping.mongo</strong></div>
+
+ <h2 title="[Java] Record UndeclaredIndex" class="title">[Java] Record UndeclaredIndex</h2>
+</div>
+<div class="contentContainer">
+<ul class="inheritance">
+<li><ul class="inheritance"></ul></li><li>org.grails.datastore.mapping.mongo.UndeclaredIndex
+</ul>
+<div class="description">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+ <!-- todo: direct known subclasses -->
+ <hr>
+
+<pre>public record UndeclaredIndex</pre>
+
+ <p> An index on a collection that domain classes map, whose keys none of those domain classes declares.
+ <DL><DT><B>Parameters:</B></DT><DD><code>database</code> - the database the collection is in</DD><DD><code>collection</code> - the collection the index is on</DD><DD><code>name</code> - the name of the index</DD><DD><code>key</code> - the index's key pattern, as <CODE>listIndexes</CODE> reports it</DD><DD><code>definition</code> - the whole index description <CODE>listIndexes</CODE> reports, options included</DD></DL><DL><DT><B>See Also:</B></DT><DD><a href='../../. [...]
+
+ </li>
+ </ul>
+</div>
+
+<div class="summary">
+ <ul class="blockList">
+ <li class="blockList">
+ <!-- =========== NESTED CLASS SUMMARY =========== -->
+
+
+ <!-- =========== ENUM CONSTANT SUMMARY =========== -->
+
+ <!-- =========== FIELD SUMMARY =========== -->
+
+
+ <!-- =========== PROPERTY SUMMARY =========== -->
+
+
+ <!-- =========== ELEMENT SUMMARY =========== -->
+
+
+
+
+
+ <!-- ========== METHOD SUMMARY =========== -->
+ <ul class="blockList">
+
+ <li class="blockList"><a name="method_summary"><!-- --></a>
+ <h3>Inherited Methods Summary</h3>
+ <ul class="blockList">
+ <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Inherited Methods Summary table">
+ <caption><span>Inherited Methods</span><span class="tabEnd"> </span></caption>
+ <tr>
+ <th class="colFirst" scope="col">Methods inherited from class</th>
+ <th class="colLast" scope="col">Name</th>
+ </tr>
+
+ <tr class="altColor">
+ <td class="colFirst"><code>class java.lang.Object</code></td>
+ <td class="colLast"><code>java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int)</code></td>
+ </tr>
+ </table>
+ </ul>
+ </li>
+
+ </ul>
+
+ </li>
+ </ul>
+</div>
+
+<div class="details">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+
+
+
+
+
+
+
+
+
+
+ </li>
+ </ul>
+</div>
+
+<!-- ========= END OF CLASS DATA ========= -->
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<div class="bottomNav"><a name="navbar_bottom">
+ <!-- -->
+</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/UndeclaredIndex" target="_top">Frames</a></li>
+ <li><a href="UndeclaredIndex.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <p><!-- Matomo -->
+<script>
+ var _paq = window._paq = window._paq || [];
+ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+ _paq.push(["setDoNotTrack", true]);
+ _paq.push(["disableCookies"]);
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="https://analytics.apache.org/";
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
+ _paq.push(['setSiteId', '79']);
+ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+ g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ })();
+</script>
+<!-- End Matomo Code --></p>
+ <a name="skip-navbar_bottom">
+ <!-- -->
+ </a>
+ </div>
+</div>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+</body>
+</html>
diff --git a/docs/snapshot/grails-data/hibernate7/api/allclasses-frame.html b/docs/snapshot/grails-data/hibernate7/api/allclasses-frame.html
index bfbff13a13ef..efc2e809b92d 100644
--- a/docs/snapshot/grails-data/hibernate7/api/allclasses-frame.html
+++ b/docs/snapshot/grails-data/hibernate7/api/allclasses-frame.html
@@ -679,6 +679,7 @@
<li><a href="org/grails/datastore/gorm/services/Implemented.html" title="annotation type in org.grails.datastore.gorm.services" target="classFrame">Implemented</a></li>
<li><a href="org/grails/datastore/mapping/core/connections/InMemoryConnectionSources.html" title="class in org.grails.datastore.mapping.core.connections" target="classFrame">InMemoryConnectionSources</a></li>
<li><a href="org/grails/orm/hibernate/cfg/domainbinding/binder/IndexBinder.html" title="class in org.grails.orm.hibernate.cfg.domainbinding.binder" target="classFrame">IndexBinder</a></li>
+<li><a href="org/grails/datastore/mapping/mongo/IndexBuildResult.html" title="record in org.grails.datastore.mapping.mongo" target="classFrame">IndexBuildResult</a></li>
<li><a href="org/grails/datastore/mapping/model/lifecycle/Initializable.html" title="interface in org.grails.datastore.mapping.model.lifecycle" target="classFrame"><I>Initializable</I></a></li>
<li><a href="org/grails/gorm/graphql/types/input/InputObjectTypeBuilder.html" title="interface in org.grails.gorm.graphql.types.input" target="classFrame"><I>InputObjectTypeBuilder</I></a></li>
<li><a href="org/grails/orm/hibernate/InstanceApiHelper.html" title="class in org.grails.orm.hibernate" target="classFrame">InstanceApiHelper</a></li>
@@ -830,6 +831,7 @@
<li><a href="org/grails/datastore/mapping/core/MethodNotImplementedException.html" title="class in org.grails.datastore.mapping.core" target="classFrame">MethodNotImplementedException</a></li>
<li><a href="org/grails/datastore/gorm/validation/jakarta/services/implementers/MethodValidationImplementer.html" title="class in org.grails.datastore.gorm.validation.jakarta.services.implementers" target="classFrame">MethodValidationImplementer</a></li>
<li><a href="grails/mongodb/geo/Metric.html" title="class in grails.mongodb.geo" target="classFrame">Metric</a></li>
+<li><a href="org/grails/datastore/mapping/mongo/MissingIndex.html" title="record in org.grails.datastore.mapping.mongo" target="classFrame">MissingIndex</a></li>
<li><a href="org/grails/datastore/mapping/engine/ModificationTrackingEntityAccess.html" title="class in org.grails.datastore.mapping.engine" target="classFrame">ModificationTrackingEntityAccess</a></li>
<li><a href="grails/mongodb/api/MongoAllOperations.html" title="interface in grails.mongodb.api" target="classFrame"><I>MongoAllOperations</I></a></li>
<li><a href="org/grails/datastore/mapping/mongo/config/MongoAttribute.html" title="class in org.grails.datastore.mapping.mongo.config" target="classFrame">MongoAttribute</a></li>
@@ -1319,6 +1321,7 @@
<li><a href="org/grails/gorm/graphql/types/scalars/coercing/URICoercion.html" title="class in org.grails.gorm.graphql.types.scalars.coercing" target="classFrame">URICoercion</a></li>
<li><a href="org/grails/gorm/graphql/types/scalars/coercing/URLCoercion.html" title="class in org.grails.gorm.graphql.types.scalars.coercing" target="classFrame">URLCoercion</a></li>
<li><a href="org/grails/gorm/graphql/types/scalars/coercing/UUIDCoercion.html" title="class in org.grails.gorm.graphql.types.scalars.coercing" target="classFrame">UUIDCoercion</a></li>
+<li><a href="org/grails/datastore/mapping/mongo/UndeclaredIndex.html" title="record in org.grails.datastore.mapping.mongo" target="classFrame">UndeclaredIndex</a></li>
<li><a href="org/grails/orm/hibernate/cfg/domainbinding/secondpass/UnidirectionalOneToManyBinder.html" title="class in org.grails.orm.hibernate.cfg.domainbinding.secondpass" target="classFrame">UnidirectionalOneToManyBinder</a></li>
<li><a href="org/grails/orm/hibernate/cfg/domainbinding/secondpass/UnidirectionalOneToManyInverseValuesBinder.html" title="class in org.grails.orm.hibernate.cfg.domainbinding.secondpass" target="classFrame">UnidirectionalOneToManyInverseValuesBinder</a></li>
<li><a href="org/grails/orm/hibernate/cfg/domainbinding/binder/UnionSubclassBinder.html" title="class in org.grails.orm.hibernate.cfg.domainbinding.binder" target="classFrame">UnionSubclassBinder</a></li>
diff --git a/docs/snapshot/grails-data/hibernate7/api/index-all.html b/docs/snapshot/grails-data/hibernate7/api/index-all.html
index 2b5456278475..82a9b1ef54c1 100644
--- a/docs/snapshot/grails-data/hibernate7/api/index-all.html
+++ b/docs/snapshot/grails-data/hibernate7/api/index-all.html
@@ -1878,6 +1878,9 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block">Creates and reconciles the indexes declared by the domain classes mapped to this datastore's connection.</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/neo4j/connections/Neo4jConnectionSourceSettings.html#buildIndex" title="Property in Neo4jConnectionSourceSettings">buildIndex</a></span> - Property in <a href="org/grails/datastore/gorm/neo4j/connections/Neo4jConnectionSourceSettings.html">Neo4jConnectionSourceSettings</a>
</dt><dd> <div class="block">Whether to build the Neo4j index</div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/MongoDatastore.html#buildIndexAsync()" title="Method in MongoDatastore">buildIndexAsync()</a></span> - Method in <a href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">Runs the same build as <a href='#buildIndex()'>buildIndex()</a> on this connection's background index build thread, whatever
+ <CODE>grails.mongodb.buildIndexesAsync</CODE> says, and returns at once with a handle on its outcome.</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/connections/AbstractMongoConnectionSourceSettings.html#buildIndexes" title="Property in AbstractMongoConnectionSourceSettings">buildIndexes</a></span> - Property in <a href="org/grails/datastore/mapping/mongo/connections/AbstractMongoConnectionSourceSettings.html">AbstractMongoConnectionSourceSettings</a>
</dt><dd> <div class="block">Whether GORM creates and reconciles the indexes declared in domain class mapping blocks by
itself when the datastore starts. </div></dd>
@@ -5577,6 +5580,8 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block">Whether to drop existing data</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/mongo/extensions/MongoExtensions.html#dropIndex(MongoCollection<Document>, Map<String, Object>, com.mongodb.client.model.DropIndexOptions)" title="Method in MongoExtensions">dropIndex(MongoCollection<Document>, Map<String, Object>, com.mongodb.client.model.DropIndexOptions)</a></span> - Method in <a href="org/grails/datastore/gorm/mongo/extensions/MongoExtensions.html">MongoExtensions</a>
</dt><dd> <div class="block"></div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/MongoDatastore.html#dropUndeclaredIndexes(List<UndeclaredIndex>)" title="Method in MongoDatastore">dropUndeclaredIndexes(List<UndeclaredIndex>)</a></span> - Method in <a href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">Drops the given indexes: those <a href='#findUndeclaredIndexes()'>findUndeclaredIndexes()</a> reported, once they have been reviewed.</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/neo4j/engine/Neo4jEntityPersister.html#DYNAMIC_ASSOCIATION_PARAM" title="Field in Neo4jEntityPersister">DYNAMIC_ASSOCIATION_PARAM</a></span> - Field in <a href="org/grails/datastore/gorm/neo4j/engine/Neo4jEntityPersister.html">Neo4jEntityPersister</a>
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/cfg/domainbinding/hibernate/HibernateMappingKeyword.html#DYNAMIC_INSERT" title="Enum Constant in HibernateMappingKeyword">DYNAMIC_INSERT</a></span> - Enum Constant in <a href="org/grails/orm/hibernate/cfg/domainbinding/hibernate/HibernateMappingKeyword.html">HibernateMappingKeyword</a>
@@ -6564,6 +6569,9 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/services/implementers/FindOneImplementer.html#findMethodToInvoke(org.codehaus.groovy.ast.ClassNode, org.codehaus.groovy.ast.MethodNode)" title="Method in FindOneImplementer">findMethodToInvoke(org.codehaus.groovy.ast.ClassNode, org.codehaus.groovy.ast.MethodNode)</a></span> - Method in <a href="org/grails/datastore/gorm/services/implementers/FindOneImplementer.html">FindOneImplementer</a>
</dt><dd> <div class="block"></div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/MongoDatastore.html#findMissingIndexes()" title="Method in MongoDatastore">findMissingIndexes()</a></span> - Method in <a href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">Lists the indexes the domain classes declare that their collections do not have, on the collections
+ whose declared indexes <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/mongo/extensions/MongoExtensions.html#findOne(MongoCollection<Document>, Map<String, Object>, Map<String, Object>, Map<String, Object>, com.mongodb.ReadPreference)" title="Method in MongoExtensions">findOne(MongoCollection<Document>, Map<String, Object>, Map<String, Object>, Map<String, Object>, com.mongodb.ReadPreference)</a></span> - Method in <a href="org/grails/datastore/gorm/mongo/extensions/MongoExt [...]
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/AbstractMongoSession.html#findOneAndDelete(com.mongodb.client.MongoCollection<T>, org.bson.conversions.Bson, com.mongodb.client.model.FindOneAndDeleteOptions)" title="Method in AbstractMongoSession">findOneAndDelete(com.mongodb.client.MongoCollection<T>, org.bson.conversions.Bson, com.mongodb.client.model.FindOneAndDeleteOptions)</a></span> - Method in <a href="org/grails/datastore/mapping/mongo/AbstractMongoSessi [...]
@@ -6710,6 +6718,9 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/jdbc/DataSourceBuilder.html#findType()" title="Method in DataSourceBuilder">findType()</a></span> - Method in <a href="org/grails/datastore/gorm/jdbc/DataSourceBuilder.html">DataSourceBuilder</a>
</dt><dd> <div class="block"></div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/MongoDatastore.html#findUndeclaredIndexes()" title="Method in MongoDatastore">findUndeclaredIndexes()</a></span> - Method in <a href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">Lists the indexes that no domain class declares, on the collections whose declared indexes
+ <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/GormEnhancer.html#findValidationApi(Class<D>, java.lang.String)" title="Method in GormEnhancer">findValidationApi(Class<D>, java.lang.String)</a></span> - Method in <a href="org/grails/datastore/gorm/GormEnhancer.html">GormEnhancer</a>
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/GormRegistry.html#findValidationApi(Class<D>, java.lang.String)" title="Method in GormRegistry">findValidationApi(Class<D>, java.lang.String)</a></span> - Method in <a href="org/grails/datastore/gorm/GormRegistry.html">GormRegistry</a>
@@ -11840,6 +11851,8 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block">Configures the index attributes</div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/cfg/domainbinding/binder/IndexBinder.html" title="Class in org.grails.orm.hibernate.cfg.domainbinding.binder">IndexBinder</a></span> - Class in <a href="./org/grails/orm/hibernate/cfg/domainbinding/binder/package-summary.html">org.grails.orm.hibernate.cfg.domainbinding.binder</a>
</dt><dd><div class="block"></div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/IndexBuildResult.html" title="Record in org.grails.datastore.mapping.mongo">IndexBuildResult</a></span> - Record in <a href="./org/grails/datastore/mapping/mongo/package-summary.html">org.grails.datastore.mapping.mongo</a>
+</dt><dd><div class="block">What an index build applied, as its summary line reports it. </div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/cfg/PropertyConfig.html#indexColumn" title="Property in PropertyConfig">indexColumn</a></span> - Property in <a href="org/grails/orm/hibernate/cfg/PropertyConfig.html">PropertyConfig</a>
</dt><dd> <div class="block">The column used to produce the index for index based collections (lists and maps)</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/neo4j/engine/Neo4jAssociationQueryExecutor.html#indexedEntity" title="Property in Neo4jAssociationQueryExecutor">indexedEntity</a></span> - Property in <a href="org/grails/datastore/gorm/neo4j/engine/Neo4jAssociationQueryExecutor.html">Neo4jAssociationQueryExecutor</a>
@@ -14619,6 +14632,8 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block"> <DL><DT><B>Returns:</B></DT><DD>The minimum size</DD></DL></div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/query/PropertyReference.html#minus(java.lang.Number)" title="Method in PropertyReference">minus(java.lang.Number)</a></span> - Method in <a href="org/grails/orm/hibernate/query/PropertyReference.html">PropertyReference</a>
</dt><dd> <div class="block"></div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/MissingIndex.html" title="Record in org.grails.datastore.mapping.mongo">MissingIndex</a></span> - Record in <a href="./org/grails/datastore/mapping/mongo/package-summary.html">org.grails.datastore.mapping.mongo</a>
+</dt><dd><div class="block">An index a domain class declares that its collection does not have.</div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/connections/HibernateConnectionSourceSettings.HibernateSettings.FlushSettings.html#mode" title="Property in HibernateConnectionSourceSettings.HibernateSettings.FlushSettings">mode</a></span> - Property in <a href="org/grails/orm/hibernate/connections/HibernateConnectionSourceSettings.HibernateSettings.FlushSettings.html">HibernateConnectionSourceSettings.HibernateSettings.FlushSettings</a>
</dt><dd> <div class="block">The default flush mode</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/mapping/multitenancy/MultiTenancySettings.html#mode" title="Property in MultiTenancySettings">mode</a></span> - Property in <a href="org/grails/datastore/mapping/multitenancy/MultiTenancySettings.html">MultiTenancySettings</a>
@@ -20720,6 +20735,8 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/grails/datastore/mapping/core/DatastoreUtils.html#unbindSession(org.grails.datastore.mapping.core.Session)" title="Method in DatastoreUtils">unbindSession(org.grails.datastore.mapping.core.Session)</a></span> - Method in <a href="org/grails/datastore/mapping/core/DatastoreUtils.html">DatastoreUtils</a>
</dt><dd> <div class="block">Unbinds and closes a session. </div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/UndeclaredIndex.html" title="Record in org.grails.datastore.mapping.mongo">UndeclaredIndex</a></span> - Record in <a href="./org/grails/datastore/mapping/mongo/package-summary.html">org.grails.datastore.mapping.mongo</a>
+</dt><dd><div class="block">An index on a collection that domain classes map, whose keys none of those domain classes declares.</div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/cfg/domainbinding/binder/GrailsDomainBinder.html#UNDERSCORE" title="Field in GrailsDomainBinder">UNDERSCORE</a></span> - Field in <a href="org/grails/orm/hibernate/cfg/domainbinding/binder/GrailsDomainBinder.html">GrailsDomainBinder</a>
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/cfg/domainbinding/secondpass/UnidirectionalOneToManyBinder.html" title="Class in org.grails.orm.hibernate.cfg.domainbinding.secondpass">UnidirectionalOneToManyBinder</a></span> - Class in <a href="./org/grails/orm/hibernate/cfg/domainbinding/secondpass/package-summary.html">org.grails.orm.hibernate.cfg.domainbinding.secondpass</a>
diff --git a/docs/snapshot/grails-data/hibernate7/api/org/grails/datastore/mapping/mongo/IndexBuildResult.html b/docs/snapshot/grails-data/hibernate7/api/org/grails/datastore/mapping/mongo/IndexBuildResult.html
new file mode 100644
index 000000000000..7f0fd3f57907
--- /dev/null
+++ b/docs/snapshot/grails-data/hibernate7/api/org/grails/datastore/mapping/mongo/IndexBuildResult.html
@@ -0,0 +1,240 @@
+<!--
+
+ 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.
+
+-->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!-- **************************************************************** -->
+<!-- * PLEASE KEEP COMPLICATED EXPRESSIONS OUT OF THESE TEMPLATES, * -->
+<!-- * i.e. only iterate & print data where possible. Thanks, Jez. * -->
+<!-- **************************************************************** -->
+
+<html>
+<head>
+ <!-- Generated by groovydoc (5.1.3) -->
+ <title>IndexBuildResult (GORM for Hibernate 7 - 8.0.0-SNAPSHOT)</title>
+
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="icon">
+ <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
+
+<body class="center">
+<script type="text/javascript"><!--
+if (location.href.indexOf('is-external=true') == -1) {
+ parent.document.title="IndexBuildResult (GORM for Hibernate 7 - 8.0.0-SNAPSHOT)";
+}
+//-->
+</script>
+<noscript>
+ <div>JavaScript is disabled on your browser.</div>
+</noscript>
+<!-- ========= START OF TOP NAVBAR ======= -->
+<div class="topNav"><a name="navbar_top">
+ <!-- -->
+</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/IndexBuildResult" target="_top">Frames</a></li>
+ <li><a href="IndexBuildResult.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <a name="skip-navbar_top">
+ <!-- -->
+ </a></div>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<!-- ======== START OF CLASS DATA ======== -->
+<div class="header">
+
+ <div class="subTitle">Package: <strong>org.grails.datastore.mapping.mongo</strong></div>
+
+ <h2 title="[Java] Record IndexBuildResult" class="title">[Java] Record IndexBuildResult</h2>
+</div>
+<div class="contentContainer">
+<ul class="inheritance">
+<li><ul class="inheritance"></ul></li><li>org.grails.datastore.mapping.mongo.IndexBuildResult
+</ul>
+<div class="description">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+ <!-- todo: direct known subclasses -->
+ <hr>
+
+<pre>public record IndexBuildResult</pre>
+
+ <p> What an index build applied, as its summary line reports it. The counts are of index declarations, so
+ declaring the same keys twice can count one created and one already present.
+ <DL><DT><B>Parameters:</B></DT><DD><code>database</code> - the database the build was for</DD><DD><code>domainClasses</code> - the domain classes considered, including those that declare no indexes</DD><DD><code>created</code> - declarations whose index did not exist before the build</DD><DD><code>recreated</code> - indexes dropped and built again for <CODE>recreateOnConflict</CODE></DD><DD><code>alreadyPresent</code> - declarations whose index already existed, [...]
+ in place</DD><DD><code>unclassified</code> - declarations applied on a collection whose existing indexes could not be listed, so
+ neither created nor already present</DD><DD><code>failures</code> - declarations that could not be applied; each is logged as it fails</DD><DD><code>elapsedMillis</code> - how long the build took</DD></DL><DL><DT><B>See Also:</B></DT><DD><a href='../../../../../org/grails/datastore/mapping/mongo/MongoDatastore.html#buildIndexAsync()' title='MongoDatastore.buildIndexAsync'>MongoDatastore.buildIndexAsync</a></DD></DL></p>
+
+ </li>
+ </ul>
+</div>
+
+<div class="summary">
+ <ul class="blockList">
+ <li class="blockList">
+ <!-- =========== NESTED CLASS SUMMARY =========== -->
+
+
+ <!-- =========== ENUM CONSTANT SUMMARY =========== -->
+
+ <!-- =========== FIELD SUMMARY =========== -->
+
+
+ <!-- =========== PROPERTY SUMMARY =========== -->
+
+
+ <!-- =========== ELEMENT SUMMARY =========== -->
+
+
+
+
+
+ <!-- ========== METHOD SUMMARY =========== -->
+ <ul class="blockList">
+
+ <li class="blockList"><a name="method_summary"><!-- --></a>
+ <h3>Inherited Methods Summary</h3>
+ <ul class="blockList">
+ <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Inherited Methods Summary table">
+ <caption><span>Inherited Methods</span><span class="tabEnd"> </span></caption>
+ <tr>
+ <th class="colFirst" scope="col">Methods inherited from class</th>
+ <th class="colLast" scope="col">Name</th>
+ </tr>
+
+ <tr class="altColor">
+ <td class="colFirst"><code>class java.lang.Object</code></td>
+ <td class="colLast"><code>java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int)</code></td>
+ </tr>
+ </table>
+ </ul>
+ </li>
+
+ </ul>
+
+ </li>
+ </ul>
+</div>
+
+<div class="details">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+
+
+
+
+
+
+
+
+
+
+ </li>
+ </ul>
+</div>
+
+<!-- ========= END OF CLASS DATA ========= -->
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<div class="bottomNav"><a name="navbar_bottom">
+ <!-- -->
+</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/IndexBuildResult" target="_top">Frames</a></li>
+ <li><a href="IndexBuildResult.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <p><!-- Matomo -->
+<script>
+ var _paq = window._paq = window._paq || [];
+ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+ _paq.push(["setDoNotTrack", true]);
+ _paq.push(["disableCookies"]);
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="https://analytics.apache.org/";
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
+ _paq.push(['setSiteId', '79']);
+ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+ g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ })();
+</script>
+<!-- End Matomo Code --></p>
+ <a name="skip-navbar_bottom">
+ <!-- -->
+ </a>
+ </div>
+</div>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+</body>
+</html>
diff --git a/docs/snapshot/grails-data/hibernate7/api/org/grails/datastore/mapping/mongo/MissingIndex.html b/docs/snapshot/grails-data/hibernate7/api/org/grails/datastore/mapping/mongo/MissingIndex.html
new file mode 100644
index 000000000000..72b1cbcdca95
--- /dev/null
+++ b/docs/snapshot/grails-data/hibernate7/api/org/grails/datastore/mapping/mongo/MissingIndex.html
@@ -0,0 +1,237 @@
+<!--
+
+ 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.
+
+-->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!-- **************************************************************** -->
+<!-- * PLEASE KEEP COMPLICATED EXPRESSIONS OUT OF THESE TEMPLATES, * -->
+<!-- * i.e. only iterate & print data where possible. Thanks, Jez. * -->
+<!-- **************************************************************** -->
+
+<html>
+<head>
+ <!-- Generated by groovydoc (5.1.3) -->
+ <title>MissingIndex (GORM for Hibernate 7 - 8.0.0-SNAPSHOT)</title>
+
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="icon">
+ <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
+
+<body class="center">
+<script type="text/javascript"><!--
+if (location.href.indexOf('is-external=true') == -1) {
+ parent.document.title="MissingIndex (GORM for Hibernate 7 - 8.0.0-SNAPSHOT)";
+}
+//-->
+</script>
+<noscript>
+ <div>JavaScript is disabled on your browser.</div>
+</noscript>
+<!-- ========= START OF TOP NAVBAR ======= -->
+<div class="topNav"><a name="navbar_top">
+ <!-- -->
+</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/MissingIndex" target="_top">Frames</a></li>
+ <li><a href="MissingIndex.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <a name="skip-navbar_top">
+ <!-- -->
+ </a></div>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<!-- ======== START OF CLASS DATA ======== -->
+<div class="header">
+
+ <div class="subTitle">Package: <strong>org.grails.datastore.mapping.mongo</strong></div>
+
+ <h2 title="[Java] Record MissingIndex" class="title">[Java] Record MissingIndex</h2>
+</div>
+<div class="contentContainer">
+<ul class="inheritance">
+<li><ul class="inheritance"></ul></li><li>org.grails.datastore.mapping.mongo.MissingIndex
+</ul>
+<div class="description">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+ <!-- todo: direct known subclasses -->
+ <hr>
+
+<pre>public record MissingIndex</pre>
+
+ <p> An index a domain class declares that its collection does not have.
+ <DL><DT><B>Parameters:</B></DT><DD><code>database</code> - the database the collection is in</DD><DD><code>collection</code> - the collection the index belongs on</DD><DD><code>domainClass</code> - the name of the domain class declaring it, the first of them if several do</DD><DD><code>key</code> - the declared key pattern</DD><DD><code>options</code> - the options declared with it, such as <CODE>unique</CODE> or <CODE>expireAfterSeconds</CODE></DD></DL><DL><DT><B> [...]
+
+ </li>
+ </ul>
+</div>
+
+<div class="summary">
+ <ul class="blockList">
+ <li class="blockList">
+ <!-- =========== NESTED CLASS SUMMARY =========== -->
+
+
+ <!-- =========== ENUM CONSTANT SUMMARY =========== -->
+
+ <!-- =========== FIELD SUMMARY =========== -->
+
+
+ <!-- =========== PROPERTY SUMMARY =========== -->
+
+
+ <!-- =========== ELEMENT SUMMARY =========== -->
+
+
+
+
+
+ <!-- ========== METHOD SUMMARY =========== -->
+ <ul class="blockList">
+
+ <li class="blockList"><a name="method_summary"><!-- --></a>
+ <h3>Inherited Methods Summary</h3>
+ <ul class="blockList">
+ <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Inherited Methods Summary table">
+ <caption><span>Inherited Methods</span><span class="tabEnd"> </span></caption>
+ <tr>
+ <th class="colFirst" scope="col">Methods inherited from class</th>
+ <th class="colLast" scope="col">Name</th>
+ </tr>
+
+ <tr class="altColor">
+ <td class="colFirst"><code>class java.lang.Object</code></td>
+ <td class="colLast"><code>java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int)</code></td>
+ </tr>
+ </table>
+ </ul>
+ </li>
+
+ </ul>
+
+ </li>
+ </ul>
+</div>
+
+<div class="details">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+
+
+
+
+
+
+
+
+
+
+ </li>
+ </ul>
+</div>
+
+<!-- ========= END OF CLASS DATA ========= -->
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<div class="bottomNav"><a name="navbar_bottom">
+ <!-- -->
+</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/MissingIndex" target="_top">Frames</a></li>
+ <li><a href="MissingIndex.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <p><!-- Matomo -->
+<script>
+ var _paq = window._paq = window._paq || [];
+ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+ _paq.push(["setDoNotTrack", true]);
+ _paq.push(["disableCookies"]);
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="https://analytics.apache.org/";
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
+ _paq.push(['setSiteId', '79']);
+ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+ g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ })();
+</script>
+<!-- End Matomo Code --></p>
+ <a name="skip-navbar_bottom">
+ <!-- -->
+ </a>
+ </div>
+</div>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+</body>
+</html>
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 03df4fc254e1..f09177082d69 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
@@ -568,328 +568,361 @@ implements <a href='../../../../../MappingContextListener.html'>MappingContextLi
</tr>
<tr class="rowColor">
+ <td class="colFirst"><code></code></td>
+ <td class="colLast"><code>public java.util.concurrent.CompletableFuture<<a href='../../../../../org/grails/datastore/mapping/mongo/IndexBuildResult.html' title='IndexBuildResult'>IndexBuildResult</a>></code></td>
+ <td class="colLast"><code><strong><a href="#buildIndexAsync()">buildIndexAsync</a></strong>()</code><br>Runs the same build as <a href='#buildIndex()'>buildIndex()</a> on this connection's background index build thread, whatever
+ <CODE>grails.mongodb.buildIndexesAsync</CODE> says, and returns at once with a handle on its outcome.</td>
+ </tr>
+
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#close()">close</a></strong>()</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected static <a href='../../../../../org/grails/datastore/mapping/core/connections/ConnectionSources.html' title='ConnectionSources'>ConnectionSources</a><MongoClient, <a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html' title='MongoConnectionSourceSettings'>MongoConnectionSourceSettings</a>></code></td>
<td class="colLast"><code><strong><a href="#createDefaultConnectionSources(com.mongodb.client.MongoClient, org.springframework.core.env.PropertyResolver, org.grails.datastore.mapping.mongo.config.MongoMappingContext, boolean)">createDefaultConnectionSources</a></strong>(<a href='../../../../../com.mongodb.client.MongoClient.html'>MongoClient</a> mongoClient, org.springframework.core.env.PropertyResolver configuration, <a href='../../../../../org/grails/datasto [...]
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected static <a href='../../../../../org/grails/datastore/mapping/mongo/config/MongoMappingContext.html'>MongoMappingContext</a></code></td>
<td class="colLast"><code><strong><a href="#createMappingContext(ConnectionSources, java.lang.Class)">createMappingContext</a></strong>(<a href='../../../../../org/grails/datastore/mapping/core/connections/ConnectionSources.html' title='ConnectionSources'>ConnectionSources</a><MongoClient, <a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html' title='MongoConnectionSourceSettings'>MongoConnectionSourceSett [...]
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected static <a href='../../../../../org/grails/datastore/mapping/mongo/config/MongoMappingContext.html'>MongoMappingContext</a></code></td>
<td class="colLast"><code><strong><a href="#createMappingContext(org.springframework.core.env.PropertyResolver, java.lang.Class)">createMappingContext</a></strong>(org.springframework.core.env.PropertyResolver configuration, java.lang.Class classes)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected static <a href='../../../../../com.mongodb.client.MongoClient.html'>MongoClient</a></code></td>
<td class="colLast"><code><strong><a href="#createMongoClient(org.springframework.core.env.PropertyResolver, com.mongodb.MongoClientSettings.Builder, org.grails.datastore.mapping.mongo.config.MongoMappingContext)">createMongoClient</a></strong>(org.springframework.core.env.PropertyResolver configuration, <a href='../../../../../com.mongodb.MongoClientSettings.Builder.html'>Builder</a> mongoOptions, <a href='../../../../../org/grails/datastore/mapping/mongo/con [...]
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected <a href='../../../../../org/grails/datastore/mapping/core/Session.html'>Session</a></code></td>
<td class="colLast"><code><strong><a href="#createSession(org.springframework.core.env.PropertyResolver)">createSession</a></strong>(org.springframework.core.env.PropertyResolver connDetails)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected <a href='../../../../../org/grails/datastore/mapping/core/Session.html'>Session</a></code></td>
<td class="colLast"><code><strong><a href="#createStatelessSession(org.springframework.core.env.PropertyResolver)">createStatelessSession</a></strong>(org.springframework.core.env.PropertyResolver connectionDetails)</code><br></td>
</tr>
+ <tr class="rowColor">
+ <td class="colFirst"><code></code></td>
+ <td class="colLast"><code>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>></code></td>
+ <td class="colLast"><code><strong><a href="#dropUndeclaredIndexes()">dropUndeclaredIndexes</a></strong>()</code><br>Drops every index that <a href='#findUndeclaredIndexes()'>findUndeclaredIndexes()</a> reports.</td>
+ </tr>
+
<tr class="altColor">
+ <td class="colFirst"><code></code></td>
+ <td class="colLast"><code>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>></code></td>
+ <td class="colLast"><code><strong><a href="#dropUndeclaredIndexes(List)">dropUndeclaredIndexes</a></strong>(java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>> indexes)</code><br>Drops the given indexes: those <a href='#findUndeclaredIndexes()'>findUndeclaredIndexes()</a> reported, once they have been reviewed.</td>
+ </tr>
+
+ <tr class="rowColor">
+ <td class="colFirst"><code></code></td>
+ <td class="colLast"><code>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/MissingIndex.html' title='MissingIndex'>MissingIndex</a>></code></td>
+ <td class="colLast"><code><strong><a href="#findMissingIndexes()">findMissingIndexes</a></strong>()</code><br>Lists the indexes the domain classes declare that their collections do not have, on the collections
+ whose declared indexes <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.</td>
+ </tr>
+
+ <tr class="altColor">
+ <td class="colFirst"><code></code></td>
+ <td class="colLast"><code>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>></code></td>
+ <td class="colLast"><code><strong><a href="#findUndeclaredIndexes()">findUndeclaredIndexes</a></strong>()</code><br>Lists the indexes that no domain class declares, on the collections whose declared indexes
+ <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.</td>
+ </tr>
+
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/gorm/events/ConfigurableApplicationEventPublisher.html'>ConfigurableApplicationEventPublisher</a></code></td>
<td class="colLast"><code><strong><a href="#getApplicationEventPublisher()">getApplicationEventPublisher</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The <a href='../../../../../org/grails/datastore/gorm/events/ConfigurableApplicationEventPublisher.html' title='ConfigurableApplicationEventPublisher'>ConfigurableApplicationEventPublisher</a> instance used by this datastore</DD></DL></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/gorm/events/AutoTimestampEventListener.html'>AutoTimestampEventListener</a></code></td>
<td class="colLast"><code><strong><a href="#getAutoTimestampEventListener()">getAutoTimestampEventListener</a></strong>()</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org.bson.codecs.configuration.CodecRegistry.html'>CodecRegistry</a></code></td>
<td class="colLast"><code><strong><a href="#getCodecRegistry()">getCodecRegistry</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The CodecRegistry</DD></DL></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public com.mongodb.client.MongoCollection<Document></code></td>
<td class="colLast"><code><strong><a href="#getCollection(org.grails.datastore.mapping.model.PersistentEntity)">getCollection</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br>Obtain the raw com.mongodb.client.MongoCollection for the given entity</td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public java.lang.String</code></td>
<td class="colLast"><code><strong><a href="#getCollectionName(org.grails.datastore.mapping.model.PersistentEntity)">getCollectionName</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br>Gets the default collection name for the given entity</td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/core/connections/ConnectionSources.html' title='ConnectionSources'>ConnectionSources</a><MongoClient, <a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html' title='MongoConnectionSourceSettings'>MongoConnectionSourceSettings</a>></code></td>
<td class="colLast"><code><strong><a href="#getConnectionSources()">getConnectionSources</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The <a href='../../../../../org/grails/datastore/mapping/core/connections/ConnectionSources.html' title='ConnectionSources'>ConnectionSources</a> for this datastore</DD></DL></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public java.lang.String</code></td>
<td class="colLast"><code><strong><a href="#getDatabaseName(org.grails.datastore.mapping.model.PersistentEntity)">getDatabaseName</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/mongo/MongoDatastore.html'>MongoDatastore</a></code></td>
<td class="colLast"><code><strong><a href="#getDatastoreForConnection(java.lang.String)">getDatastoreForConnection</a></strong>(java.lang.String connectionName)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/core/Datastore.html'>Datastore</a></code></td>
<td class="colLast"><code><strong><a href="#getDatastoreForConnection(java.lang.String)">getDatastoreForConnection</a></strong>(java.lang.String connectionName)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/mongo/MongoDatastore.html'>MongoDatastore</a></code></td>
<td class="colLast"><code><strong><a href="#getDatastoreForTenantId(java.io.Serializable)">getDatastoreForTenantId</a></strong>(java.io.Serializable tenantId)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public java.lang.String</code></td>
<td class="colLast"><code><strong><a href="#getDefaultDatabase()">getDefaultDatabase</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The default database name</DD></DL></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public jakarta.persistence.FlushModeType</code></td>
<td class="colLast"><code><strong><a href="#getDefaultFlushMode()">getDefaultFlushMode</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The default flush mode</DD></DL></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code><D></code></td>
<td class="colLast"><code>protected <a href='../../../../../org/grails/datastore/gorm/GormInstanceApi.html' title='GormInstanceApi'>GormInstanceApi</a><D></code></td>
<td class="colLast"><code><strong><a href="#getInstanceApi(Class, java.lang.String)">getInstanceApi</a></strong>(java.lang.Class<D> cls, java.lang.String qualifier)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/mongo/config/MongoMappingContext.html'>MongoMappingContext</a></code></td>
<td class="colLast"><code><strong><a href="#getMappingContext()">getMappingContext</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The mapping context</DD></DL></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../com.mongodb.client.MongoClient.html'>MongoClient</a></code></td>
<td class="colLast"><code><strong><a href="#getMongoClient()">getMongoClient</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The MongoClient instance</DD></DL></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/multitenancy/MultiTenancySettings.MultiTenancyMode.html'>MultiTenancyMode</a></code></td>
<td class="colLast"><code><strong><a href="#getMultiTenancyMode()">getMultiTenancyMode</a></strong>()</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.html'>PersistentEntityCodec</a></code></td>
<td class="colLast"><code><strong><a href="#getPersistentEntityCodec(org.grails.datastore.mapping.model.PersistentEntity)">getPersistentEntityCodec</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br>Obtains a <a href='../../../../../org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.html' title='PersistentEntityCodec'>PersistentEntityCodec</a> for the given e [...]
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.html'>PersistentEntityCodec</a></code></td>
<td class="colLast"><code><strong><a href="#getPersistentEntityCodec(java.lang.Class)">getPersistentEntityCodec</a></strong>(java.lang.Class entityClass)</code><br>Obtains a <a href='../../../../../org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.html' title='PersistentEntityCodec'>PersistentEntityCodec</a> for the given entity</td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public int</code></td>
<td class="colLast"><code><strong><a href="#getPhase()">getPhase</a></strong>()</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code><D></code></td>
<td class="colLast"><code>protected MongoStaticApi<D></code></td>
<td class="colLast"><code><strong><a href="#getStaticApi(Class, java.lang.String)">getStaticApi</a></strong>(java.lang.Class<D> cls, java.lang.String qualifier)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/multitenancy/TenantResolver.html'>TenantResolver</a></code></td>
<td class="colLast"><code><strong><a href="#getTenantResolver()">getTenantResolver</a></strong>()</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public org.springframework.transaction.PlatformTransactionManager</code></td>
<td class="colLast"><code><strong><a href="#getTransactionManager()">getTransactionManager</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The transaction manager</DD></DL></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code><D></code></td>
<td class="colLast"><code>protected <a href='../../../../../org/grails/datastore/gorm/GormValidationApi.html' title='GormValidationApi'>GormValidationApi</a><D></code></td>
<td class="colLast"><code><strong><a href="#getValidationApi(Class, java.lang.String)">getValidationApi</a></strong>(java.lang.Class<D> cls, java.lang.String qualifier)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected <a href='../../../../../org/grails/datastore/gorm/mongo/MongoGormEnhancer.html'>MongoGormEnhancer</a></code></td>
<td class="colLast"><code><strong><a href="#initialize(org.grails.datastore.mapping.mongo.connections.MongoConnectionSourceSettings)">initialize</a></strong>(<a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html'>MongoConnectionSourceSettings</a> settings)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected <a href='../../../../../org/grails/datastore/gorm/mongo/MongoGormEnhancer.html'>MongoGormEnhancer</a></code></td>
<td class="colLast"><code><strong><a href="#initialize(org.grails.datastore.mapping.mongo.connections.MongoConnectionSourceSettings)">initialize</a></strong>(<a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html'>MongoConnectionSourceSettings</a> settings)</code><br>Runs the initialization sequence</td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="#initializeIndices(org.grails.datastore.mapping.model.PersistentEntity)">initializeIndices</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br>Indexes any properties that are mapped with index:true. </td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public boolean</code></td>
<td class="colLast"><code><strong><a href="#isBuildIndexes()">isBuildIndexes</a></strong>()</code><br>Whether GORM creates and reconciles the indexes declared in the domain class mapping blocks by itself:
when the datastore starts, and for connections and domain classes added later. </td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public boolean</code></td>
<td class="colLast"><code><strong><a href="#isBuildIndexesAsync()">isBuildIndexesAsync</a></strong>()</code><br>Whether index builds run on a background thread instead of blocking the thread that starts them - the
one GORM starts on startup, and any <a href='#buildIndex()'>buildIndex()</a> the application calls. </td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public boolean</code></td>
<td class="colLast"><code><strong><a href="#isRunning()">isRunning</a></strong>()</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public boolean</code></td>
<td class="colLast"><code><strong><a href="#isSchemaless()">isSchemaless</a></strong>()</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public boolean</code></td>
<td class="colLast"><code><strong><a href="#isTransactionsEnabled()">isTransactionsEnabled</a></strong>()</code><br>Whether GORM should use real MongoDB multi-document transactions (a server-side
<CODE>ClientSession</CODE>) for transactional operations. </td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#newConnectionSource(ConnectionSource)">newConnectionSource</a></strong>(<a href='../../../../../org/grails/datastore/mapping/core/connections/ConnectionSource.html' title='ConnectionSource'>ConnectionSource</a><MongoClient, <a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html' title='MongoConnectionSourceSettings'>MongoConnectionSourceSettings</a>> connection [...]
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#persistentEntityAdded(org.grails.datastore.mapping.model.PersistentEntity)">persistentEntityAdded</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#persistentEntityAdded(org.grails.datastore.mapping.model.PersistentEntity)">persistentEntityAdded</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="#registerAllEntitiesWithEnhancer()">registerAllEntitiesWithEnhancer</a></strong>()</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="#registerEntity(org.grails.datastore.mapping.model.PersistentEntity)">registerEntity</a></strong>(<a href='../../../../../org/grails/datastore/mapping/model/PersistentEntity.html'>PersistentEntity</a> entity)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="#registerEventListeners(org.grails.datastore.gorm.events.ConfigurableApplicationEventPublisher)">registerEventListeners</a></strong>(<a href='../../../../../org/grails/datastore/gorm/events/ConfigurableApplicationEventPublisher.html'>ConfigurableApplicationEventPublisher</a> eventPublisher)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public java.io.Serializable</code></td>
<td class="colLast"><code><strong><a href="#resolveTenantIdentifier()">resolveTenantIdentifier</a></strong>()</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public java.lang.Iterable<java.io.Serializable></code></td>
<td class="colLast"><code><strong><a href="#resolveTenantIds()">resolveTenantIds</a></strong>()</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#setCodecProviders(List)">setCodecProviders</a></strong>(java.util.List<CodecProvider> codecProviders)</code><br>Sets any additional codec providers</td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#setCodecRegistries(List)">setCodecRegistries</a></strong>(java.util.List<CodecRegistry> codecRegistries)</code><br>Sets any additional codec registries</td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#setCodecs(List)">setCodecs</a></strong>(java.util.List<Codec<?>> codecs)</code><br>Sets any additional codecs</td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#setMessageSource(List)">setMessageSource</a></strong>(java.util.List<org.springframework.context.MessageSource> messageSources)</code><br>The message source used for validation messages</td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#setMessageSource(org.springframework.context.MessageSource)">setMessageSource</a></strong>(org.springframework.context.MessageSource messageSource)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#start()">start</a></strong>()</code><br>Builds a replacement for each MongoClient that <a href='#stop()'>stop()</a> closed, using the
same factory the original was built with, so settings applied at startup still apply. </td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#stop()">stop</a></strong>()</code><br>Closes the MongoClient of every connection, so the process can be checkpointed.</td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code><T1></code></td>
<td class="colLast"><code>public <a href='../../../../../T1.html'>T1</a></code></td>
<td class="colLast"><code><strong><a href="#withNewSession(java.io.Serializable, Closure)">withNewSession</a></strong>(java.io.Serializable tenantId, groovy.lang.Closure<T1> callable)</code><br></td>
@@ -1531,11 +1564,37 @@ implements <a href='../../../../../MappingContextListener.html'>MappingContextLi
<p>Each index is created by a command that the server answers only once the index has been built,
so this blocks the calling thread for as long as MongoDB takes to build every declared index. With
<CODE>grails.mongodb.buildIndexesAsync</CODE> enabled the work goes to a background thread and this
- returns immediately instead.
+ returns immediately instead. <a href='#buildIndexAsync()'>buildIndexAsync()</a> runs it in the background whatever the setting,
+ and reports the outcome to its caller. Builds on a connection run one at a time, wherever they run: a
+ build on the calling thread first waits for one running in the background, and the other way round, and a
+ domain class registered after startup is indexed once neither is running.
</p>
</li>
</ul>
+ <a name="buildIndexAsync()"><!-- --></a>
+ <ul class="blockListLast">
+ <li class="blockList">
+ <h4>public java.util.concurrent.CompletableFuture<<a href='../../../../../org/grails/datastore/mapping/mongo/IndexBuildResult.html' title='IndexBuildResult'>IndexBuildResult</a>> <strong>buildIndexAsync</strong>()</h4>
+ <p> Runs the same build as <a href='#buildIndex()'>buildIndex()</a> on this connection's background index build thread, whatever
+ <CODE>grails.mongodb.buildIndexesAsync</CODE> says, and returns at once with a handle on its outcome.
+
+ <p>The future completes with the build's <a href='../../../../../org/grails/datastore/mapping/mongo/IndexBuildResult.html' title='IndexBuildResult'>IndexBuildResult</a> once every declaration has been applied,
+ including when some of them failed: those are counted in <a href='../../../../../org/grails/datastore/mapping/mongo/IndexBuildResult.html#failures()' title='IndexBuildResult.failures'>IndexBuildResult.failures</a> and logged
+ as they happen. It completes exceptionally with the exception that stopped the build partway, such as a
+ lost connection or a write concern the server could not satisfy. Created and already-present indexes are always told apart, whatever the log level.
+
+ <p>Builds on a connection run one at a time, so a build requested while another is running waits for it,
+ including one running on a caller's thread with <a href='#buildIndex()'>buildIndex()</a>, or one indexing a domain class
+ registered after startup.
+ Cancelling the future does not stop the build. If the datastore is stopped or closed, the future completes
+ exceptionally at once, and a build that stopping or closing the datastore cuts short completes
+ exceptionally too; a restart runs the cut-short build again, without a future. Each named connection
+ builds its own domain classes: call this on <a href='#getDatastoreForConnection(java.lang.String)'>getDatastoreForConnection(String)</a> for those.
+ <DL><DT><B>Returns:</B></DT><DD>the outcome of the build</DD></DL></p>
+ </li>
+ </ul>
+
<a name="close()"><!-- --></a>
<ul class="blockListLast">
<li class="blockList">
@@ -1596,6 +1655,75 @@ implements <a href='../../../../../MappingContextListener.html'>MappingContextLi
</li>
</ul>
+ <a name="dropUndeclaredIndexes()"><!-- --></a>
+ <ul class="blockListLast">
+ <li class="blockList">
+ <h4>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>> <strong>dropUndeclaredIndexes</strong>()</h4>
+ <p> Drops every index that <a href='#findUndeclaredIndexes()'>findUndeclaredIndexes()</a> reports.
+
+ <p>Run this deliberately, once every instance of the application runs the release whose domain classes
+ declare the indexes to keep. An instance still on an earlier release does not declare what a later
+ release added, nor an index created by hand ahead of a deployment, so to it those indexes are
+ undeclared and this drops them.
+ <DL><DT><B>Returns:</B></DT><DD>the indexes dropped</DD></DL></p>
+ </li>
+ </ul>
+
+ <a name="dropUndeclaredIndexes(List)"><!-- --></a>
+ <ul class="blockListLast">
+ <li class="blockList">
+ <h4>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>> <strong>dropUndeclaredIndexes</strong>(java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>> indexes)</h4>
+ <p> Drops the given indexes: those <a href='#findUndeclaredIndexes()'>findUndeclaredIndexes()</a> reported, once they have been reviewed.
+
+ <p>Each index is checked again before it is dropped, since the reviewed list can be older than what is on
+ the server: one is dropped only while the index of that name is on the keys reviewed, its collection is
+ mapped on this datastore's connection, and no domain class mapped to it declares those keys. An index that
+ no longer exists, or whose collection no longer does, is skipped, and so is one that fails a check, which
+ is logged at <CODE>WARN</CODE>.
+ <DL><DT><B>Parameters:</B></DT><DD><code>indexes</code> - the indexes to drop</DD></DL><DL><DT><B>Returns:</B></DT><DD>the indexes dropped</DD></DL></p>
+ </li>
+ </ul>
+
+ <a name="findMissingIndexes()"><!-- --></a>
+ <ul class="blockListLast">
+ <li class="blockList">
+ <h4>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/MissingIndex.html' title='MissingIndex'>MissingIndex</a>> <strong>findMissingIndexes</strong>()</h4>
+ <p> Lists the indexes the domain classes declare that their collections do not have, on the collections
+ whose declared indexes <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.
+
+ <p>A declared index is present when its collection has an index on the same key pattern, the same fields
+ in the same order, whatever its name and options: an option that differs is the build's to reconcile.
+ A text index is present when one indexes the same text fields, in any order, with the same keys before and
+ after them, whatever its weights. Keys that several classes mapped to one collection declare are reported
+ once. Nothing is changed:
+ <a href='#buildIndex()'>buildIndex()</a> or <a href='#buildIndexAsync()'>buildIndexAsync()</a> creates them. Each named connection has its own
+ domain classes, so call this on <a href='#getDatastoreForConnection(java.lang.String)'>getDatastoreForConnection(String)</a> for those.
+ <DL><DT><B>Returns:</B></DT><DD>the missing indexes, collection by collection, in the order the domain classes declare them</DD></DL></p>
+ </li>
+ </ul>
+
+ <a name="findUndeclaredIndexes()"><!-- --></a>
+ <ul class="blockListLast">
+ <li class="blockList">
+ <h4>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>> <strong>findUndeclaredIndexes</strong>()</h4>
+ <p> Lists the indexes that no domain class declares, on the collections whose declared indexes
+ <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.
+
+ <p>An index is declared when a domain class mapped to the same collection declares its key pattern, the
+ same fields in the same order, with <CODE>compoundIndex</CODE>, <CODE>index</CODE> or a property's
+ <CODE>index: true</CODE>. Its name and options do not matter. A text index is declared when a class declares
+ text on the same fields, in any order, with the same keys before and after them; its weights do not
+ matter. The <CODE>_id</CODE> index is never reported, and
+ neither is any index on a collection that no domain class maps. An index that an
+ <a href='#initializeIndices(org.grails.datastore.mapping.model.PersistentEntity)'>initializeIndices(PersistentEntity)</a> override creates by itself is not a declaration, so it is
+ reported.
+
+ <p>Nothing is changed: see <a href='#dropUndeclaredIndexes()'>dropUndeclaredIndexes()</a>. Each named connection has its own domain
+ classes, so call this on <a href='#getDatastoreForConnection(java.lang.String)'>getDatastoreForConnection(String)</a> for those.
+ <DL><DT><B>Returns:</B></DT><DD>the undeclared indexes, collection by collection, in the order the server lists them</DD></DL></p>
+ </li>
+ </ul>
+
<a name="getApplicationEventPublisher()"><!-- --></a>
<ul class="blockListLast">
<li class="blockList">
diff --git a/docs/snapshot/grails-data/hibernate7/api/org/grails/datastore/mapping/mongo/UndeclaredIndex.html b/docs/snapshot/grails-data/hibernate7/api/org/grails/datastore/mapping/mongo/UndeclaredIndex.html
new file mode 100644
index 000000000000..b31f52ead71a
--- /dev/null
+++ b/docs/snapshot/grails-data/hibernate7/api/org/grails/datastore/mapping/mongo/UndeclaredIndex.html
@@ -0,0 +1,237 @@
+<!--
+
+ 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.
+
+-->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!-- **************************************************************** -->
+<!-- * PLEASE KEEP COMPLICATED EXPRESSIONS OUT OF THESE TEMPLATES, * -->
+<!-- * i.e. only iterate & print data where possible. Thanks, Jez. * -->
+<!-- **************************************************************** -->
+
+<html>
+<head>
+ <!-- Generated by groovydoc (5.1.3) -->
+ <title>UndeclaredIndex (GORM for Hibernate 7 - 8.0.0-SNAPSHOT)</title>
+
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="icon">
+ <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
+
+<body class="center">
+<script type="text/javascript"><!--
+if (location.href.indexOf('is-external=true') == -1) {
+ parent.document.title="UndeclaredIndex (GORM for Hibernate 7 - 8.0.0-SNAPSHOT)";
+}
+//-->
+</script>
+<noscript>
+ <div>JavaScript is disabled on your browser.</div>
+</noscript>
+<!-- ========= START OF TOP NAVBAR ======= -->
+<div class="topNav"><a name="navbar_top">
+ <!-- -->
+</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/UndeclaredIndex" target="_top">Frames</a></li>
+ <li><a href="UndeclaredIndex.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <a name="skip-navbar_top">
+ <!-- -->
+ </a></div>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<!-- ======== START OF CLASS DATA ======== -->
+<div class="header">
+
+ <div class="subTitle">Package: <strong>org.grails.datastore.mapping.mongo</strong></div>
+
+ <h2 title="[Java] Record UndeclaredIndex" class="title">[Java] Record UndeclaredIndex</h2>
+</div>
+<div class="contentContainer">
+<ul class="inheritance">
+<li><ul class="inheritance"></ul></li><li>org.grails.datastore.mapping.mongo.UndeclaredIndex
+</ul>
+<div class="description">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+ <!-- todo: direct known subclasses -->
+ <hr>
+
+<pre>public record UndeclaredIndex</pre>
+
+ <p> An index on a collection that domain classes map, whose keys none of those domain classes declares.
+ <DL><DT><B>Parameters:</B></DT><DD><code>database</code> - the database the collection is in</DD><DD><code>collection</code> - the collection the index is on</DD><DD><code>name</code> - the name of the index</DD><DD><code>key</code> - the index's key pattern, as <CODE>listIndexes</CODE> reports it</DD><DD><code>definition</code> - the whole index description <CODE>listIndexes</CODE> reports, options included</DD></DL><DL><DT><B>See Also:</B></DT><DD><a href='../../. [...]
+
+ </li>
+ </ul>
+</div>
+
+<div class="summary">
+ <ul class="blockList">
+ <li class="blockList">
+ <!-- =========== NESTED CLASS SUMMARY =========== -->
+
+
+ <!-- =========== ENUM CONSTANT SUMMARY =========== -->
+
+ <!-- =========== FIELD SUMMARY =========== -->
+
+
+ <!-- =========== PROPERTY SUMMARY =========== -->
+
+
+ <!-- =========== ELEMENT SUMMARY =========== -->
+
+
+
+
+
+ <!-- ========== METHOD SUMMARY =========== -->
+ <ul class="blockList">
+
+ <li class="blockList"><a name="method_summary"><!-- --></a>
+ <h3>Inherited Methods Summary</h3>
+ <ul class="blockList">
+ <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Inherited Methods Summary table">
+ <caption><span>Inherited Methods</span><span class="tabEnd"> </span></caption>
+ <tr>
+ <th class="colFirst" scope="col">Methods inherited from class</th>
+ <th class="colLast" scope="col">Name</th>
+ </tr>
+
+ <tr class="altColor">
+ <td class="colFirst"><code>class java.lang.Object</code></td>
+ <td class="colLast"><code>java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int)</code></td>
+ </tr>
+ </table>
+ </ul>
+ </li>
+
+ </ul>
+
+ </li>
+ </ul>
+</div>
+
+<div class="details">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+
+
+
+
+
+
+
+
+
+
+ </li>
+ </ul>
+</div>
+
+<!-- ========= END OF CLASS DATA ========= -->
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<div class="bottomNav"><a name="navbar_bottom">
+ <!-- -->
+</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/UndeclaredIndex" target="_top">Frames</a></li>
+ <li><a href="UndeclaredIndex.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <p><!-- Matomo -->
+<script>
+ var _paq = window._paq = window._paq || [];
+ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+ _paq.push(["setDoNotTrack", true]);
+ _paq.push(["disableCookies"]);
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="https://analytics.apache.org/";
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
+ _paq.push(['setSiteId', '79']);
+ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+ g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ })();
+</script>
+<!-- End Matomo Code --></p>
+ <a name="skip-navbar_bottom">
+ <!-- -->
+ </a>
+ </div>
+</div>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+</body>
+</html>
diff --git a/docs/snapshot/grails-data/mongodb/api/allclasses-frame.html b/docs/snapshot/grails-data/mongodb/api/allclasses-frame.html
index d21b6110d8f2..c66c790062d9 100644
--- a/docs/snapshot/grails-data/mongodb/api/allclasses-frame.html
+++ b/docs/snapshot/grails-data/mongodb/api/allclasses-frame.html
@@ -409,6 +409,7 @@
<li><a href="org/grails/datastore/bson/codecs/encoders/IdentityEncoder.html" title="class in org.grails.datastore.bson.codecs.encoders" target="classFrame">IdentityEncoder</a></li>
<li><a href="org/grails/orm/hibernate/cfg/IdentityEnumType.html" title="class in org.grails.orm.hibernate.cfg" target="classFrame">IdentityEnumType</a></li>
<li><a href="org/grails/orm/hibernate/cfg/domainbinding/binder/IndexBinder.html" title="class in org.grails.orm.hibernate.cfg.domainbinding.binder" target="classFrame">IndexBinder</a></li>
+<li><a href="org/grails/datastore/mapping/mongo/IndexBuildResult.html" title="record in org.grails.datastore.mapping.mongo" target="classFrame">IndexBuildResult</a></li>
<li><a href="org/grails/gorm/graphql/types/input/InputObjectTypeBuilder.html" title="interface in org.grails.gorm.graphql.types.input" target="classFrame"><I>InputObjectTypeBuilder</I></a></li>
<li><a href="org/grails/orm/hibernate/InstanceApiHelper.html" title="class in org.grails.orm.hibernate" target="classFrame">InstanceApiHelper</a></li>
<li><a href="org/grails/orm/hibernate/cfg/InstanceProxy.html" title="class in org.grails.orm.hibernate.cfg" target="classFrame">InstanceProxy</a></li>
@@ -485,6 +486,7 @@
<li><a href="org/grails/orm/hibernate/cfg/MappingCacheHolder.html" title="class in org.grails.orm.hibernate.cfg" target="classFrame">MappingCacheHolder</a></li>
<li><a href="org/grails/orm/hibernate/MetadataIntegrator.html" title="class in org.grails.orm.hibernate" target="classFrame">MetadataIntegrator</a></li>
<li><a href="grails/mongodb/geo/Metric.html" title="class in grails.mongodb.geo" target="classFrame">Metric</a></li>
+<li><a href="org/grails/datastore/mapping/mongo/MissingIndex.html" title="record in org.grails.datastore.mapping.mongo" target="classFrame">MissingIndex</a></li>
<li><a href="grails/mongodb/api/MongoAllOperations.html" title="interface in grails.mongodb.api" target="classFrame"><I>MongoAllOperations</I></a></li>
<li><a href="org/grails/datastore/mapping/mongo/config/MongoAttribute.html" title="class in org.grails.datastore.mapping.mongo.config" target="classFrame">MongoAttribute</a></li>
<li><a href="org/grails/datastore/mapping/mongo/config/MongoClientOptionsBuilder.html" title="class in org.grails.datastore.mapping.mongo.config" target="classFrame">MongoClientOptionsBuilder</a></li>
@@ -739,6 +741,7 @@
<li><a href="org/grails/gorm/graphql/types/scalars/coercing/URICoercion.html" title="class in org.grails.gorm.graphql.types.scalars.coercing" target="classFrame">URICoercion</a></li>
<li><a href="org/grails/gorm/graphql/types/scalars/coercing/URLCoercion.html" title="class in org.grails.gorm.graphql.types.scalars.coercing" target="classFrame">URLCoercion</a></li>
<li><a href="org/grails/gorm/graphql/types/scalars/coercing/UUIDCoercion.html" title="class in org.grails.gorm.graphql.types.scalars.coercing" target="classFrame">UUIDCoercion</a></li>
+<li><a href="org/grails/datastore/mapping/mongo/UndeclaredIndex.html" title="record in org.grails.datastore.mapping.mongo" target="classFrame">UndeclaredIndex</a></li>
<li><a href="org/grails/orm/hibernate/cfg/domainbinding/secondpass/UnidirectionalOneToManyBinder.html" title="class in org.grails.orm.hibernate.cfg.domainbinding.secondpass" target="classFrame">UnidirectionalOneToManyBinder</a></li>
<li><a href="org/grails/orm/hibernate/cfg/domainbinding/secondpass/UnidirectionalOneToManyInverseValuesBinder.html" title="class in org.grails.orm.hibernate.cfg.domainbinding.secondpass" target="classFrame">UnidirectionalOneToManyInverseValuesBinder</a></li>
<li><a href="org/grails/orm/hibernate/cfg/domainbinding/binder/UnionSubclassBinder.html" title="class in org.grails.orm.hibernate.cfg.domainbinding.binder" target="classFrame">UnionSubclassBinder</a></li>
diff --git a/docs/snapshot/grails-data/mongodb/api/index-all.html b/docs/snapshot/grails-data/mongodb/api/index-all.html
index d90470db09aa..2ab9e7df17a9 100644
--- a/docs/snapshot/grails-data/mongodb/api/index-all.html
+++ b/docs/snapshot/grails-data/mongodb/api/index-all.html
@@ -1153,6 +1153,9 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block">Creates and reconciles the indexes declared by the domain classes mapped to this datastore's connection.</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/neo4j/connections/Neo4jConnectionSourceSettings.html#buildIndex" title="Property in Neo4jConnectionSourceSettings">buildIndex</a></span> - Property in <a href="org/grails/datastore/gorm/neo4j/connections/Neo4jConnectionSourceSettings.html">Neo4jConnectionSourceSettings</a>
</dt><dd> <div class="block">Whether to build the Neo4j index</div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/MongoDatastore.html#buildIndexAsync()" title="Method in MongoDatastore">buildIndexAsync()</a></span> - Method in <a href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">Runs the same build as <a href='#buildIndex()'>buildIndex()</a> on this connection's background index build thread, whatever
+ <CODE>grails.mongodb.buildIndexesAsync</CODE> says, and returns at once with a handle on its outcome.</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/connections/AbstractMongoConnectionSourceSettings.html#buildIndexes" title="Property in AbstractMongoConnectionSourceSettings">buildIndexes</a></span> - Property in <a href="org/grails/datastore/mapping/mongo/connections/AbstractMongoConnectionSourceSettings.html">AbstractMongoConnectionSourceSettings</a>
</dt><dd> <div class="block">Whether GORM creates and reconciles the indexes declared in domain class mapping blocks by
itself when the datastore starts. </div></dd>
@@ -3291,6 +3294,8 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block">Whether to drop existing data</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/mongo/extensions/MongoExtensions.html#dropIndex(MongoCollection<Document>, Map<String, Object>, com.mongodb.client.model.DropIndexOptions)" title="Method in MongoExtensions">dropIndex(MongoCollection<Document>, Map<String, Object>, com.mongodb.client.model.DropIndexOptions)</a></span> - Method in <a href="org/grails/datastore/gorm/mongo/extensions/MongoExtensions.html">MongoExtensions</a>
</dt><dd> <div class="block"></div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/MongoDatastore.html#dropUndeclaredIndexes(List<UndeclaredIndex>)" title="Method in MongoDatastore">dropUndeclaredIndexes(List<UndeclaredIndex>)</a></span> - Method in <a href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">Drops the given indexes: those <a href='#findUndeclaredIndexes()'>findUndeclaredIndexes()</a> reported, once they have been reviewed.</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/neo4j/engine/Neo4jEntityPersister.html#DYNAMIC_ASSOCIATION_PARAM" title="Field in Neo4jEntityPersister">DYNAMIC_ASSOCIATION_PARAM</a></span> - Field in <a href="org/grails/datastore/gorm/neo4j/engine/Neo4jEntityPersister.html">Neo4jEntityPersister</a>
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/cfg/domainbinding/hibernate/HibernateMappingKeyword.html#DYNAMIC_INSERT" title="Enum Constant in HibernateMappingKeyword">DYNAMIC_INSERT</a></span> - Enum Constant in <a href="org/grails/orm/hibernate/cfg/domainbinding/hibernate/HibernateMappingKeyword.html">HibernateMappingKeyword</a>
@@ -3821,6 +3826,9 @@ 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/event/listener/HibernateEventListener.html#findEventListener(java.lang.Object, org.hibernate.engine.spi.SessionFactoryImplementor)" title="Method in HibernateEventListener">findEventListener(java.lang.Object, org.hibernate.engine.spi.SessionFactoryImplementor)</a></span> - Method in <a href="org/grails/orm/hibernate/event/listener/HibernateEventListener.html">HibernateEventListener</a>
</dt><dd> <div class="block"></div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/MongoDatastore.html#findMissingIndexes()" title="Method in MongoDatastore">findMissingIndexes()</a></span> - Method in <a href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">Lists the indexes the domain classes declare that their collections do not have, on the collections
+ whose declared indexes <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/mongo/extensions/MongoExtensions.html#findOne(MongoCollection<Document>, Map<String, Object>, Map<String, Object>, Map<String, Object>, com.mongodb.ReadPreference)" title="Method in MongoExtensions">findOne(MongoCollection<Document>, Map<String, Object>, Map<String, Object>, Map<String, Object>, com.mongodb.ReadPreference)</a></span> - Method in <a href="org/grails/datastore/gorm/mongo/extensions/MongoExt [...]
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/AbstractMongoSession.html#findOneAndDelete(com.mongodb.client.MongoCollection<T>, org.bson.conversions.Bson, com.mongodb.client.model.FindOneAndDeleteOptions)" title="Method in AbstractMongoSession">findOneAndDelete(com.mongodb.client.MongoCollection<T>, org.bson.conversions.Bson, com.mongodb.client.model.FindOneAndDeleteOptions)</a></span> - Method in <a href="org/grails/datastore/mapping/mongo/AbstractMongoSessi [...]
@@ -3876,6 +3884,9 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd><div class="block">Service implementer for findShortestPath</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/neo4j/services/implementers/FindShortestPathImplementer.html#FindShortestPathImplementer()" title="Constructor in FindShortestPathImplementer">FindShortestPathImplementer()</a></span> - Constructor in <a href="org/grails/datastore/gorm/neo4j/services/implementers/FindShortestPathImplementer.html">FindShortestPathImplementer</a>
</dt><dd> <div class="block"></div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/MongoDatastore.html#findUndeclaredIndexes()" title="Method in MongoDatastore">findUndeclaredIndexes()</a></span> - Method in <a href="org/grails/datastore/mapping/mongo/MongoDatastore.html">MongoDatastore</a>
+</dt><dd> <div class="block">Lists the indexes that no domain class declares, on the collections whose declared indexes
+ <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.</div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/AbstractHibernateGormStaticApi.html#findWhere(java.util.Map, java.util.Map)" title="Method in AbstractHibernateGormStaticApi">findWhere(java.util.Map, java.util.Map)</a></span> - Method in <a href="org/grails/orm/hibernate/AbstractHibernateGormStaticApi.html">AbstractHibernateGormStaticApi</a>
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/AbstractHibernateGormStaticApi.html#findWithSql(java.lang.CharSequence, java.util.Map)" title="Method in AbstractHibernateGormStaticApi">findWithSql(java.lang.CharSequence, java.util.Map)</a></span> - Method in <a href="org/grails/orm/hibernate/AbstractHibernateGormStaticApi.html">AbstractHibernateGormStaticApi</a>
@@ -6767,6 +6778,8 @@ if (location.href.indexOf('is-external=true') == -1) {
</dt><dd> <div class="block">Configures the index attributes</div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/cfg/domainbinding/binder/IndexBinder.html" title="Class in org.grails.orm.hibernate.cfg.domainbinding.binder">IndexBinder</a></span> - Class in <a href="./org/grails/orm/hibernate/cfg/domainbinding/binder/package-summary.html">org.grails.orm.hibernate.cfg.domainbinding.binder</a>
</dt><dd><div class="block"></div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/IndexBuildResult.html" title="Record in org.grails.datastore.mapping.mongo">IndexBuildResult</a></span> - Record in <a href="./org/grails/datastore/mapping/mongo/package-summary.html">org.grails.datastore.mapping.mongo</a>
+</dt><dd><div class="block">What an index build applied, as its summary line reports it. </div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/cfg/PropertyConfig.html#indexColumn" title="Property in PropertyConfig">indexColumn</a></span> - Property in <a href="org/grails/orm/hibernate/cfg/PropertyConfig.html">PropertyConfig</a>
</dt><dd> <div class="block">The column used to produce the index for index based collections (lists and maps)</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/gorm/neo4j/engine/Neo4jAssociationQueryExecutor.html#indexedEntity" title="Property in Neo4jAssociationQueryExecutor">indexedEntity</a></span> - Property in <a href="org/grails/datastore/gorm/neo4j/engine/Neo4jAssociationQueryExecutor.html">Neo4jAssociationQueryExecutor</a>
@@ -8025,6 +8038,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/query/PropertyReference.html#minus(java.lang.Number)" title="Method in PropertyReference">minus(java.lang.Number)</a></span> - Method in <a href="org/grails/orm/hibernate/query/PropertyReference.html">PropertyReference</a>
</dt><dd> <div class="block"></div></dd>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/MissingIndex.html" title="Record in org.grails.datastore.mapping.mongo">MissingIndex</a></span> - Record in <a href="./org/grails/datastore/mapping/mongo/package-summary.html">org.grails.datastore.mapping.mongo</a>
+</dt><dd><div class="block">An index a domain class declares that its collection does not have.</div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/connections/HibernateConnectionSourceSettings.HibernateSettings.FlushSettings.html#mode" title="Property in HibernateConnectionSourceSettings.HibernateSettings.FlushSettings">mode</a></span> - Property in <a href="org/grails/orm/hibernate/connections/HibernateConnectionSourceSettings.HibernateSettings.FlushSettings.html">HibernateConnectionSourceSettings.HibernateSettings.FlushSettings</a>
</dt><dd> <div class="block">The default flush mode</div></dd>
<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/query/MongoQuery.html#MONGO_AND_OPERATOR" title="Field in MongoQuery">MONGO_AND_OPERATOR</a></span> - Field in <a href="org/grails/datastore/mapping/mongo/query/MongoQuery.html">MongoQuery</a>
@@ -11480,6 +11495,8 @@ if (location.href.indexOf('is-external=true') == -1) {
<h2 class="title">U</h2>
<dl>
+<dt><span class="strong"><a href="org/grails/datastore/mapping/mongo/UndeclaredIndex.html" title="Record in org.grails.datastore.mapping.mongo">UndeclaredIndex</a></span> - Record in <a href="./org/grails/datastore/mapping/mongo/package-summary.html">org.grails.datastore.mapping.mongo</a>
+</dt><dd><div class="block">An index on a collection that domain classes map, whose keys none of those domain classes declares.</div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/cfg/domainbinding/binder/GrailsDomainBinder.html#UNDERSCORE" title="Field in GrailsDomainBinder">UNDERSCORE</a></span> - Field in <a href="org/grails/orm/hibernate/cfg/domainbinding/binder/GrailsDomainBinder.html">GrailsDomainBinder</a>
</dt><dd> <div class="block"></div></dd>
<dt><span class="strong"><a href="org/grails/orm/hibernate/cfg/domainbinding/secondpass/UnidirectionalOneToManyBinder.html" title="Class in org.grails.orm.hibernate.cfg.domainbinding.secondpass">UnidirectionalOneToManyBinder</a></span> - Class in <a href="./org/grails/orm/hibernate/cfg/domainbinding/secondpass/package-summary.html">org.grails.orm.hibernate.cfg.domainbinding.secondpass</a>
diff --git a/docs/snapshot/grails-data/mongodb/api/org/grails/datastore/mapping/mongo/IndexBuildResult.html b/docs/snapshot/grails-data/mongodb/api/org/grails/datastore/mapping/mongo/IndexBuildResult.html
new file mode 100644
index 000000000000..4ae3b75dea4d
--- /dev/null
+++ b/docs/snapshot/grails-data/mongodb/api/org/grails/datastore/mapping/mongo/IndexBuildResult.html
@@ -0,0 +1,241 @@
+<!--
+
+ 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.
+
+-->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!-- **************************************************************** -->
+<!-- * PLEASE KEEP COMPLICATED EXPRESSIONS OUT OF THESE TEMPLATES, * -->
+<!-- * i.e. only iterate & print data where possible. Thanks, Jez. * -->
+<!-- **************************************************************** -->
+
+<html>
+<head>
+ <!-- Generated by groovydoc (5.1.3) -->
+ <title>IndexBuildResult (GORM for MongoDB - 8.0.0-SNAPSHOT)</title>
+
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="icon">
+ <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
+
+<body class="center">
+<script type="text/javascript"><!--
+if (location.href.indexOf('is-external=true') == -1) {
+ parent.document.title="IndexBuildResult (GORM for MongoDB - 8.0.0-SNAPSHOT)";
+}
+//-->
+</script>
+<noscript>
+ <div>JavaScript is disabled on your browser.</div>
+</noscript>
+<!-- ========= START OF TOP NAVBAR ======= -->
+<div class="topNav"><a name="navbar_top">
+ <!-- -->
+</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/IndexBuildResult" target="_top">Frames</a></li>
+ <li><a href="IndexBuildResult.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <a name="skip-navbar_top">
+ <!-- -->
+ </a></div>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<!-- ======== START OF CLASS DATA ======== -->
+<div class="header">
+
+ <div class="subTitle">Package: <strong>org.grails.datastore.mapping.mongo</strong></div>
+
+ <h2 title="[Java] Record IndexBuildResult" class="title">[Java] Record IndexBuildResult</h2>
+</div>
+<div class="contentContainer">
+<ul class="inheritance">
+<li><ul class="inheritance"></ul></li><li><ul class="inheritance"></ul></li><li>org.grails.datastore.mapping.mongo.IndexBuildResult
+</ul>
+<div class="description">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+ <!-- todo: direct known subclasses -->
+ <hr>
+
+<pre>public record IndexBuildResult
+extends java.lang.Record</pre>
+
+ <p> What an index build applied, as its summary line reports it. The counts are of index declarations, so
+ declaring the same keys twice can count one created and one already present.
+ <DL><DT><B>Parameters:</B></DT><DD><code>database</code> - the database the build was for</DD><DD><code>domainClasses</code> - the domain classes considered, including those that declare no indexes</DD><DD><code>created</code> - declarations whose index did not exist before the build</DD><DD><code>recreated</code> - indexes dropped and built again for <CODE>recreateOnConflict</CODE></DD><DD><code>alreadyPresent</code> - declarations whose index already existed, [...]
+ in place</DD><DD><code>unclassified</code> - declarations applied on a collection whose existing indexes could not be listed, so
+ neither created nor already present</DD><DD><code>failures</code> - declarations that could not be applied; each is logged as it fails</DD><DD><code>elapsedMillis</code> - how long the build took</DD></DL><DL><DT><B>See Also:</B></DT><DD><a href='../../../../../org/grails/datastore/mapping/mongo/MongoDatastore.html#buildIndexAsync()' title='MongoDatastore.buildIndexAsync'>MongoDatastore.buildIndexAsync</a></DD></DL></p>
+
+ </li>
+ </ul>
+</div>
+
+<div class="summary">
+ <ul class="blockList">
+ <li class="blockList">
+ <!-- =========== NESTED CLASS SUMMARY =========== -->
+
+
+ <!-- =========== ENUM CONSTANT SUMMARY =========== -->
+
+ <!-- =========== FIELD SUMMARY =========== -->
+
+
+ <!-- =========== PROPERTY SUMMARY =========== -->
+
+
+ <!-- =========== ELEMENT SUMMARY =========== -->
+
+
+
+
+
+ <!-- ========== METHOD SUMMARY =========== -->
+ <ul class="blockList">
+
+ <li class="blockList"><a name="method_summary"><!-- --></a>
+ <h3>Inherited Methods Summary</h3>
+ <ul class="blockList">
+ <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Inherited Methods Summary table">
+ <caption><span>Inherited Methods</span><span class="tabEnd"> </span></caption>
+ <tr>
+ <th class="colFirst" scope="col">Methods inherited from class</th>
+ <th class="colLast" scope="col">Name</th>
+ </tr>
+
+ <tr class="altColor">
+ <td class="colFirst"><code>class java.lang.Record</code></td>
+ <td class="colLast"><code>java.lang.Record#equals(java.lang.Object), java.lang.Record#getClass(), java.lang.Record#hashCode(), java.lang.Record#notify(), java.lang.Record#notifyAll(), java.lang.Record#toString(), java.lang.Record#wait(), java.lang.Record#wait(long), java.lang.Record#wait(long, int)</code></td>
+ </tr>
+ </table>
+ </ul>
+ </li>
+
+ </ul>
+
+ </li>
+ </ul>
+</div>
+
+<div class="details">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+
+
+
+
+
+
+
+
+
+
+ </li>
+ </ul>
+</div>
+
+<!-- ========= END OF CLASS DATA ========= -->
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<div class="bottomNav"><a name="navbar_bottom">
+ <!-- -->
+</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/IndexBuildResult" target="_top">Frames</a></li>
+ <li><a href="IndexBuildResult.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <p><!-- Matomo -->
+<script>
+ var _paq = window._paq = window._paq || [];
+ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+ _paq.push(["setDoNotTrack", true]);
+ _paq.push(["disableCookies"]);
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="https://analytics.apache.org/";
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
+ _paq.push(['setSiteId', '79']);
+ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+ g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ })();
+</script>
+<!-- End Matomo Code --></p>
+ <a name="skip-navbar_bottom">
+ <!-- -->
+ </a>
+ </div>
+</div>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+</body>
+</html>
diff --git a/docs/snapshot/grails-data/mongodb/api/org/grails/datastore/mapping/mongo/MissingIndex.html b/docs/snapshot/grails-data/mongodb/api/org/grails/datastore/mapping/mongo/MissingIndex.html
new file mode 100644
index 000000000000..2e0ab9a740a9
--- /dev/null
+++ b/docs/snapshot/grails-data/mongodb/api/org/grails/datastore/mapping/mongo/MissingIndex.html
@@ -0,0 +1,238 @@
+<!--
+
+ 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.
+
+-->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!-- **************************************************************** -->
+<!-- * PLEASE KEEP COMPLICATED EXPRESSIONS OUT OF THESE TEMPLATES, * -->
+<!-- * i.e. only iterate & print data where possible. Thanks, Jez. * -->
+<!-- **************************************************************** -->
+
+<html>
+<head>
+ <!-- Generated by groovydoc (5.1.3) -->
+ <title>MissingIndex (GORM for MongoDB - 8.0.0-SNAPSHOT)</title>
+
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="icon">
+ <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
+
+<body class="center">
+<script type="text/javascript"><!--
+if (location.href.indexOf('is-external=true') == -1) {
+ parent.document.title="MissingIndex (GORM for MongoDB - 8.0.0-SNAPSHOT)";
+}
+//-->
+</script>
+<noscript>
+ <div>JavaScript is disabled on your browser.</div>
+</noscript>
+<!-- ========= START OF TOP NAVBAR ======= -->
+<div class="topNav"><a name="navbar_top">
+ <!-- -->
+</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/MissingIndex" target="_top">Frames</a></li>
+ <li><a href="MissingIndex.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <a name="skip-navbar_top">
+ <!-- -->
+ </a></div>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<!-- ======== START OF CLASS DATA ======== -->
+<div class="header">
+
+ <div class="subTitle">Package: <strong>org.grails.datastore.mapping.mongo</strong></div>
+
+ <h2 title="[Java] Record MissingIndex" class="title">[Java] Record MissingIndex</h2>
+</div>
+<div class="contentContainer">
+<ul class="inheritance">
+<li><ul class="inheritance"></ul></li><li><ul class="inheritance"></ul></li><li>org.grails.datastore.mapping.mongo.MissingIndex
+</ul>
+<div class="description">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+ <!-- todo: direct known subclasses -->
+ <hr>
+
+<pre>public record MissingIndex
+extends java.lang.Record</pre>
+
+ <p> An index a domain class declares that its collection does not have.
+ <DL><DT><B>Parameters:</B></DT><DD><code>database</code> - the database the collection is in</DD><DD><code>collection</code> - the collection the index belongs on</DD><DD><code>domainClass</code> - the name of the domain class declaring it, the first of them if several do</DD><DD><code>key</code> - the declared key pattern</DD><DD><code>options</code> - the options declared with it, such as <CODE>unique</CODE> or <CODE>expireAfterSeconds</CODE></DD></DL><DL><DT><B> [...]
+
+ </li>
+ </ul>
+</div>
+
+<div class="summary">
+ <ul class="blockList">
+ <li class="blockList">
+ <!-- =========== NESTED CLASS SUMMARY =========== -->
+
+
+ <!-- =========== ENUM CONSTANT SUMMARY =========== -->
+
+ <!-- =========== FIELD SUMMARY =========== -->
+
+
+ <!-- =========== PROPERTY SUMMARY =========== -->
+
+
+ <!-- =========== ELEMENT SUMMARY =========== -->
+
+
+
+
+
+ <!-- ========== METHOD SUMMARY =========== -->
+ <ul class="blockList">
+
+ <li class="blockList"><a name="method_summary"><!-- --></a>
+ <h3>Inherited Methods Summary</h3>
+ <ul class="blockList">
+ <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Inherited Methods Summary table">
+ <caption><span>Inherited Methods</span><span class="tabEnd"> </span></caption>
+ <tr>
+ <th class="colFirst" scope="col">Methods inherited from class</th>
+ <th class="colLast" scope="col">Name</th>
+ </tr>
+
+ <tr class="altColor">
+ <td class="colFirst"><code>class java.lang.Record</code></td>
+ <td class="colLast"><code>java.lang.Record#equals(java.lang.Object), java.lang.Record#getClass(), java.lang.Record#hashCode(), java.lang.Record#notify(), java.lang.Record#notifyAll(), java.lang.Record#toString(), java.lang.Record#wait(), java.lang.Record#wait(long), java.lang.Record#wait(long, int)</code></td>
+ </tr>
+ </table>
+ </ul>
+ </li>
+
+ </ul>
+
+ </li>
+ </ul>
+</div>
+
+<div class="details">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+
+
+
+
+
+
+
+
+
+
+ </li>
+ </ul>
+</div>
+
+<!-- ========= END OF CLASS DATA ========= -->
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<div class="bottomNav"><a name="navbar_bottom">
+ <!-- -->
+</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/MissingIndex" target="_top">Frames</a></li>
+ <li><a href="MissingIndex.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <p><!-- Matomo -->
+<script>
+ var _paq = window._paq = window._paq || [];
+ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+ _paq.push(["setDoNotTrack", true]);
+ _paq.push(["disableCookies"]);
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="https://analytics.apache.org/";
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
+ _paq.push(['setSiteId', '79']);
+ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+ g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ })();
+</script>
+<!-- End Matomo Code --></p>
+ <a name="skip-navbar_bottom">
+ <!-- -->
+ </a>
+ </div>
+</div>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+</body>
+</html>
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 955d72f78510..938fbfd5e25d 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
@@ -551,328 +551,361 @@ implements <a href='../../../../../MappingContextListener.html'>MappingContextLi
</tr>
<tr class="rowColor">
+ <td class="colFirst"><code></code></td>
+ <td class="colLast"><code>public java.util.concurrent.CompletableFuture<<a href='../../../../../org/grails/datastore/mapping/mongo/IndexBuildResult.html' title='IndexBuildResult'>IndexBuildResult</a>></code></td>
+ <td class="colLast"><code><strong><a href="#buildIndexAsync()">buildIndexAsync</a></strong>()</code><br>Runs the same build as <a href='#buildIndex()'>buildIndex()</a> on this connection's background index build thread, whatever
+ <CODE>grails.mongodb.buildIndexesAsync</CODE> says, and returns at once with a handle on its outcome.</td>
+ </tr>
+
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#close()">close</a></strong>()</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected static org.grails.datastore.mapping.core.connections.ConnectionSources<com.mongodb.client.MongoClient, <a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html' title='MongoConnectionSourceSettings'>MongoConnectionSourceSettings</a>></code></td>
<td class="colLast"><code><strong><a href="#createDefaultConnectionSources(com.mongodb.client.MongoClient, org.springframework.core.env.PropertyResolver, org.grails.datastore.mapping.mongo.config.MongoMappingContext, boolean)">createDefaultConnectionSources</a></strong>(com.mongodb.client.MongoClient mongoClient, org.springframework.core.env.PropertyResolver configuration, <a href='../../../../../org/grails/datastore/mapping/mongo/config/MongoMappingContext.ht [...]
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected static <a href='../../../../../org/grails/datastore/mapping/mongo/config/MongoMappingContext.html'>MongoMappingContext</a></code></td>
<td class="colLast"><code><strong><a href="#createMappingContext(ConnectionSources, java.lang.Class)">createMappingContext</a></strong>(org.grails.datastore.mapping.core.connections.ConnectionSources<com.mongodb.client.MongoClient, <a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html' title='MongoConnectionSourceSettings'>MongoConnectionSourceSettings</a>> connectionSources, java.lang.Class classes)</c [...]
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected static <a href='../../../../../org/grails/datastore/mapping/mongo/config/MongoMappingContext.html'>MongoMappingContext</a></code></td>
<td class="colLast"><code><strong><a href="#createMappingContext(org.springframework.core.env.PropertyResolver, java.lang.Class)">createMappingContext</a></strong>(org.springframework.core.env.PropertyResolver configuration, java.lang.Class classes)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected static com.mongodb.client.MongoClient</code></td>
<td class="colLast"><code><strong><a href="#createMongoClient(org.springframework.core.env.PropertyResolver, com.mongodb.MongoClientSettings$Builder, org.grails.datastore.mapping.mongo.config.MongoMappingContext)">createMongoClient</a></strong>(org.springframework.core.env.PropertyResolver configuration, com.mongodb.MongoClientSettings$Builder mongoOptions, <a href='../../../../../org/grails/datastore/mapping/mongo/config/MongoMappingContext.html'>MongoMapping [...]
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected org.grails.datastore.mapping.core.Session</code></td>
<td class="colLast"><code><strong><a href="#createSession(org.springframework.core.env.PropertyResolver)">createSession</a></strong>(org.springframework.core.env.PropertyResolver connDetails)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected org.grails.datastore.mapping.core.Session</code></td>
<td class="colLast"><code><strong><a href="#createStatelessSession(org.springframework.core.env.PropertyResolver)">createStatelessSession</a></strong>(org.springframework.core.env.PropertyResolver connectionDetails)</code><br></td>
</tr>
+ <tr class="rowColor">
+ <td class="colFirst"><code></code></td>
+ <td class="colLast"><code>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>></code></td>
+ <td class="colLast"><code><strong><a href="#dropUndeclaredIndexes()">dropUndeclaredIndexes</a></strong>()</code><br>Drops every index that <a href='#findUndeclaredIndexes()'>findUndeclaredIndexes()</a> reports.</td>
+ </tr>
+
<tr class="altColor">
+ <td class="colFirst"><code></code></td>
+ <td class="colLast"><code>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>></code></td>
+ <td class="colLast"><code><strong><a href="#dropUndeclaredIndexes(List)">dropUndeclaredIndexes</a></strong>(java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>> indexes)</code><br>Drops the given indexes: those <a href='#findUndeclaredIndexes()'>findUndeclaredIndexes()</a> reported, once they have been reviewed.</td>
+ </tr>
+
+ <tr class="rowColor">
+ <td class="colFirst"><code></code></td>
+ <td class="colLast"><code>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/MissingIndex.html' title='MissingIndex'>MissingIndex</a>></code></td>
+ <td class="colLast"><code><strong><a href="#findMissingIndexes()">findMissingIndexes</a></strong>()</code><br>Lists the indexes the domain classes declare that their collections do not have, on the collections
+ whose declared indexes <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.</td>
+ </tr>
+
+ <tr class="altColor">
+ <td class="colFirst"><code></code></td>
+ <td class="colLast"><code>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>></code></td>
+ <td class="colLast"><code><strong><a href="#findUndeclaredIndexes()">findUndeclaredIndexes</a></strong>()</code><br>Lists the indexes that no domain class declares, on the collections whose declared indexes
+ <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.</td>
+ </tr>
+
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public org.grails.datastore.gorm.events.ConfigurableApplicationEventPublisher</code></td>
<td class="colLast"><code><strong><a href="#getApplicationEventPublisher()">getApplicationEventPublisher</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The org.grails.datastore.gorm.events.ConfigurableApplicationEventPublisher instance used by this datastore</DD></DL></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public org.grails.datastore.gorm.events.AutoTimestampEventListener</code></td>
<td class="colLast"><code><strong><a href="#getAutoTimestampEventListener()">getAutoTimestampEventListener</a></strong>()</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public org.bson.codecs.configuration.CodecRegistry</code></td>
<td class="colLast"><code><strong><a href="#getCodecRegistry()">getCodecRegistry</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The org.bson.codecs.configuration.CodecRegistry</DD></DL></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public com.mongodb.client.MongoCollection<org.bson.Document></code></td>
<td class="colLast"><code><strong><a href="#getCollection(org.grails.datastore.mapping.model.PersistentEntity)">getCollection</a></strong>(org.grails.datastore.mapping.model.PersistentEntity entity)</code><br>Obtain the raw com.mongodb.client.MongoCollection for the given entity</td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public java.lang.String</code></td>
<td class="colLast"><code><strong><a href="#getCollectionName(org.grails.datastore.mapping.model.PersistentEntity)">getCollectionName</a></strong>(org.grails.datastore.mapping.model.PersistentEntity entity)</code><br>Gets the default collection name for the given entity</td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public org.grails.datastore.mapping.core.connections.ConnectionSources<com.mongodb.client.MongoClient, <a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html' title='MongoConnectionSourceSettings'>MongoConnectionSourceSettings</a>></code></td>
<td class="colLast"><code><strong><a href="#getConnectionSources()">getConnectionSources</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The org.grails.datastore.mapping.core.connections.ConnectionSources for this datastore</DD></DL></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public java.lang.String</code></td>
<td class="colLast"><code><strong><a href="#getDatabaseName(org.grails.datastore.mapping.model.PersistentEntity)">getDatabaseName</a></strong>(org.grails.datastore.mapping.model.PersistentEntity entity)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/mongo/MongoDatastore.html'>MongoDatastore</a></code></td>
<td class="colLast"><code><strong><a href="#getDatastoreForConnection(java.lang.String)">getDatastoreForConnection</a></strong>(java.lang.String connectionName)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public org.grails.datastore.mapping.core.Datastore</code></td>
<td class="colLast"><code><strong><a href="#getDatastoreForConnection(java.lang.String)">getDatastoreForConnection</a></strong>(java.lang.String connectionName)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/mongo/MongoDatastore.html'>MongoDatastore</a></code></td>
<td class="colLast"><code><strong><a href="#getDatastoreForTenantId(java.io.Serializable)">getDatastoreForTenantId</a></strong>(java.io.Serializable tenantId)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public java.lang.String</code></td>
<td class="colLast"><code><strong><a href="#getDefaultDatabase()">getDefaultDatabase</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The default database name</DD></DL></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public jakarta.persistence.FlushModeType</code></td>
<td class="colLast"><code><strong><a href="#getDefaultFlushMode()">getDefaultFlushMode</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The default flush mode</DD></DL></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code><D></code></td>
<td class="colLast"><code>protected org.grails.datastore.gorm.GormInstanceApi<D></code></td>
<td class="colLast"><code><strong><a href="#getInstanceApi(Class, java.lang.String)">getInstanceApi</a></strong>(java.lang.Class<D> cls, java.lang.String qualifier)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/mongo/config/MongoMappingContext.html'>MongoMappingContext</a></code></td>
<td class="colLast"><code><strong><a href="#getMappingContext()">getMappingContext</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The mapping context</DD></DL></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public com.mongodb.client.MongoClient</code></td>
<td class="colLast"><code><strong><a href="#getMongoClient()">getMongoClient</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The com.mongodb.client.MongoClient instance</DD></DL></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public org.grails.datastore.mapping.multitenancy.MultiTenancySettings$MultiTenancyMode</code></td>
<td class="colLast"><code><strong><a href="#getMultiTenancyMode()">getMultiTenancyMode</a></strong>()</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.html'>PersistentEntityCodec</a></code></td>
<td class="colLast"><code><strong><a href="#getPersistentEntityCodec(org.grails.datastore.mapping.model.PersistentEntity)">getPersistentEntityCodec</a></strong>(org.grails.datastore.mapping.model.PersistentEntity entity)</code><br>Obtains a <a href='../../../../../org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.html' title='PersistentEntityCodec'>PersistentEntityCodec</a> for the given entity</td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public <a href='../../../../../org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.html'>PersistentEntityCodec</a></code></td>
<td class="colLast"><code><strong><a href="#getPersistentEntityCodec(java.lang.Class)">getPersistentEntityCodec</a></strong>(java.lang.Class entityClass)</code><br>Obtains a <a href='../../../../../org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.html' title='PersistentEntityCodec'>PersistentEntityCodec</a> for the given entity</td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public int</code></td>
<td class="colLast"><code><strong><a href="#getPhase()">getPhase</a></strong>()</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code><D></code></td>
<td class="colLast"><code>protected <a href='../../../../../org/grails/datastore/gorm/mongo/api/MongoStaticApi.html' title='MongoStaticApi'>MongoStaticApi</a><D></code></td>
<td class="colLast"><code><strong><a href="#getStaticApi(Class, java.lang.String)">getStaticApi</a></strong>(java.lang.Class<D> cls, java.lang.String qualifier)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public org.grails.datastore.mapping.multitenancy.TenantResolver</code></td>
<td class="colLast"><code><strong><a href="#getTenantResolver()">getTenantResolver</a></strong>()</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public org.springframework.transaction.PlatformTransactionManager</code></td>
<td class="colLast"><code><strong><a href="#getTransactionManager()">getTransactionManager</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>The transaction manager</DD></DL></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code><D></code></td>
<td class="colLast"><code>protected org.grails.datastore.gorm.GormValidationApi<D></code></td>
<td class="colLast"><code><strong><a href="#getValidationApi(Class, java.lang.String)">getValidationApi</a></strong>(java.lang.Class<D> cls, java.lang.String qualifier)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected <a href='../../../../../org/grails/datastore/gorm/mongo/MongoGormEnhancer.html'>MongoGormEnhancer</a></code></td>
<td class="colLast"><code><strong><a href="#initialize(org.grails.datastore.mapping.mongo.connections.MongoConnectionSourceSettings)">initialize</a></strong>(<a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html'>MongoConnectionSourceSettings</a> settings)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected <a href='../../../../../org/grails/datastore/gorm/mongo/MongoGormEnhancer.html'>MongoGormEnhancer</a></code></td>
<td class="colLast"><code><strong><a href="#initialize(org.grails.datastore.mapping.mongo.connections.MongoConnectionSourceSettings)">initialize</a></strong>(<a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html'>MongoConnectionSourceSettings</a> settings)</code><br>Runs the initialization sequence</td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="#initializeIndices(org.grails.datastore.mapping.model.PersistentEntity)">initializeIndices</a></strong>(org.grails.datastore.mapping.model.PersistentEntity entity)</code><br>Indexes any properties that are mapped with index:true. </td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public boolean</code></td>
<td class="colLast"><code><strong><a href="#isBuildIndexes()">isBuildIndexes</a></strong>()</code><br>Whether GORM creates and reconciles the indexes declared in the domain class mapping blocks by itself:
when the datastore starts, and for connections and domain classes added later. </td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public boolean</code></td>
<td class="colLast"><code><strong><a href="#isBuildIndexesAsync()">isBuildIndexesAsync</a></strong>()</code><br>Whether index builds run on a background thread instead of blocking the thread that starts them - the
one GORM starts on startup, and any <a href='#buildIndex()'>buildIndex()</a> the application calls. </td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public boolean</code></td>
<td class="colLast"><code><strong><a href="#isRunning()">isRunning</a></strong>()</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public boolean</code></td>
<td class="colLast"><code><strong><a href="#isSchemaless()">isSchemaless</a></strong>()</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public boolean</code></td>
<td class="colLast"><code><strong><a href="#isTransactionsEnabled()">isTransactionsEnabled</a></strong>()</code><br>Whether GORM should use real MongoDB multi-document transactions (a server-side
<CODE>ClientSession</CODE>) for transactional operations. </td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#newConnectionSource(ConnectionSource)">newConnectionSource</a></strong>(org.grails.datastore.mapping.core.connections.ConnectionSource<com.mongodb.client.MongoClient, <a href='../../../../../org/grails/datastore/mapping/mongo/connections/MongoConnectionSourceSettings.html' title='MongoConnectionSourceSettings'>MongoConnectionSourceSettings</a>> connectionSource)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#persistentEntityAdded(org.grails.datastore.mapping.model.PersistentEntity)">persistentEntityAdded</a></strong>(org.grails.datastore.mapping.model.PersistentEntity entity)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#persistentEntityAdded(org.grails.datastore.mapping.model.PersistentEntity)">persistentEntityAdded</a></strong>(org.grails.datastore.mapping.model.PersistentEntity entity)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="#registerAllEntitiesWithEnhancer()">registerAllEntitiesWithEnhancer</a></strong>()</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="#registerEntity(org.grails.datastore.mapping.model.PersistentEntity)">registerEntity</a></strong>(org.grails.datastore.mapping.model.PersistentEntity entity)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="#registerEventListeners(org.grails.datastore.gorm.events.ConfigurableApplicationEventPublisher)">registerEventListeners</a></strong>(org.grails.datastore.gorm.events.ConfigurableApplicationEventPublisher eventPublisher)</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public java.io.Serializable</code></td>
<td class="colLast"><code><strong><a href="#resolveTenantIdentifier()">resolveTenantIdentifier</a></strong>()</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public java.lang.Iterable<java.io.Serializable></code></td>
<td class="colLast"><code><strong><a href="#resolveTenantIds()">resolveTenantIds</a></strong>()</code><br></td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#setCodecProviders(List)">setCodecProviders</a></strong>(java.util.List<org.bson.codecs.configuration.CodecProvider> codecProviders)</code><br>Sets any additional codec providers</td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#setCodecRegistries(List)">setCodecRegistries</a></strong>(java.util.List<org.bson.codecs.configuration.CodecRegistry> codecRegistries)</code><br>Sets any additional codec registries</td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#setCodecs(List)">setCodecs</a></strong>(java.util.List<org.bson.codecs.Codec<?>> codecs)</code><br>Sets any additional codecs</td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#setMessageSource(List)">setMessageSource</a></strong>(java.util.List<org.springframework.context.MessageSource> messageSources)</code><br>The message source used for validation messages</td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#setMessageSource(org.springframework.context.MessageSource)">setMessageSource</a></strong>(org.springframework.context.MessageSource messageSource)</code><br></td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#start()">start</a></strong>()</code><br>Builds a replacement for each com.mongodb.client.MongoClient that <a href='#stop()'>stop()</a> closed, using the
same factory the original was built with, so settings applied at startup still apply. </td>
</tr>
- <tr class="rowColor">
+ <tr class="altColor">
<td class="colFirst"><code></code></td>
<td class="colLast"><code>public void</code></td>
<td class="colLast"><code><strong><a href="#stop()">stop</a></strong>()</code><br>Closes the com.mongodb.client.MongoClient of every connection, so the process can be checkpointed.</td>
</tr>
- <tr class="altColor">
+ <tr class="rowColor">
<td class="colFirst"><code><T1></code></td>
<td class="colLast"><code>public <a href='../../../../../T1.html'>T1</a></code></td>
<td class="colLast"><code><strong><a href="#withNewSession(java.io.Serializable, Closure)">withNewSession</a></strong>(java.io.Serializable tenantId, groovy.lang.Closure<T1> callable)</code><br></td>
@@ -1514,11 +1547,37 @@ implements <a href='../../../../../MappingContextListener.html'>MappingContextLi
<p>Each index is created by a command that the server answers only once the index has been built,
so this blocks the calling thread for as long as MongoDB takes to build every declared index. With
<CODE>grails.mongodb.buildIndexesAsync</CODE> enabled the work goes to a background thread and this
- returns immediately instead.
+ returns immediately instead. <a href='#buildIndexAsync()'>buildIndexAsync()</a> runs it in the background whatever the setting,
+ and reports the outcome to its caller. Builds on a connection run one at a time, wherever they run: a
+ build on the calling thread first waits for one running in the background, and the other way round, and a
+ domain class registered after startup is indexed once neither is running.
</p>
</li>
</ul>
+ <a name="buildIndexAsync()"><!-- --></a>
+ <ul class="blockListLast">
+ <li class="blockList">
+ <h4>public java.util.concurrent.CompletableFuture<<a href='../../../../../org/grails/datastore/mapping/mongo/IndexBuildResult.html' title='IndexBuildResult'>IndexBuildResult</a>> <strong>buildIndexAsync</strong>()</h4>
+ <p> Runs the same build as <a href='#buildIndex()'>buildIndex()</a> on this connection's background index build thread, whatever
+ <CODE>grails.mongodb.buildIndexesAsync</CODE> says, and returns at once with a handle on its outcome.
+
+ <p>The future completes with the build's <a href='../../../../../org/grails/datastore/mapping/mongo/IndexBuildResult.html' title='IndexBuildResult'>IndexBuildResult</a> once every declaration has been applied,
+ including when some of them failed: those are counted in <a href='../../../../../org/grails/datastore/mapping/mongo/IndexBuildResult.html#failures()' title='IndexBuildResult.failures'>IndexBuildResult.failures</a> and logged
+ as they happen. It completes exceptionally with the exception that stopped the build partway, such as a
+ lost connection or a write concern the server could not satisfy. Created and already-present indexes are always told apart, whatever the log level.
+
+ <p>Builds on a connection run one at a time, so a build requested while another is running waits for it,
+ including one running on a caller's thread with <a href='#buildIndex()'>buildIndex()</a>, or one indexing a domain class
+ registered after startup.
+ Cancelling the future does not stop the build. If the datastore is stopped or closed, the future completes
+ exceptionally at once, and a build that stopping or closing the datastore cuts short completes
+ exceptionally too; a restart runs the cut-short build again, without a future. Each named connection
+ builds its own domain classes: call this on <a href='#getDatastoreForConnection(java.lang.String)'>getDatastoreForConnection(String)</a> for those.
+ <DL><DT><B>Returns:</B></DT><DD>the outcome of the build</DD></DL></p>
+ </li>
+ </ul>
+
<a name="close()"><!-- --></a>
<ul class="blockListLast">
<li class="blockList">
@@ -1579,6 +1638,75 @@ implements <a href='../../../../../MappingContextListener.html'>MappingContextLi
</li>
</ul>
+ <a name="dropUndeclaredIndexes()"><!-- --></a>
+ <ul class="blockListLast">
+ <li class="blockList">
+ <h4>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>> <strong>dropUndeclaredIndexes</strong>()</h4>
+ <p> Drops every index that <a href='#findUndeclaredIndexes()'>findUndeclaredIndexes()</a> reports.
+
+ <p>Run this deliberately, once every instance of the application runs the release whose domain classes
+ declare the indexes to keep. An instance still on an earlier release does not declare what a later
+ release added, nor an index created by hand ahead of a deployment, so to it those indexes are
+ undeclared and this drops them.
+ <DL><DT><B>Returns:</B></DT><DD>the indexes dropped</DD></DL></p>
+ </li>
+ </ul>
+
+ <a name="dropUndeclaredIndexes(List)"><!-- --></a>
+ <ul class="blockListLast">
+ <li class="blockList">
+ <h4>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>> <strong>dropUndeclaredIndexes</strong>(java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>> indexes)</h4>
+ <p> Drops the given indexes: those <a href='#findUndeclaredIndexes()'>findUndeclaredIndexes()</a> reported, once they have been reviewed.
+
+ <p>Each index is checked again before it is dropped, since the reviewed list can be older than what is on
+ the server: one is dropped only while the index of that name is on the keys reviewed, its collection is
+ mapped on this datastore's connection, and no domain class mapped to it declares those keys. An index that
+ no longer exists, or whose collection no longer does, is skipped, and so is one that fails a check, which
+ is logged at <CODE>WARN</CODE>.
+ <DL><DT><B>Parameters:</B></DT><DD><code>indexes</code> - the indexes to drop</DD></DL><DL><DT><B>Returns:</B></DT><DD>the indexes dropped</DD></DL></p>
+ </li>
+ </ul>
+
+ <a name="findMissingIndexes()"><!-- --></a>
+ <ul class="blockListLast">
+ <li class="blockList">
+ <h4>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/MissingIndex.html' title='MissingIndex'>MissingIndex</a>> <strong>findMissingIndexes</strong>()</h4>
+ <p> Lists the indexes the domain classes declare that their collections do not have, on the collections
+ whose declared indexes <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.
+
+ <p>A declared index is present when its collection has an index on the same key pattern, the same fields
+ in the same order, whatever its name and options: an option that differs is the build's to reconcile.
+ A text index is present when one indexes the same text fields, in any order, with the same keys before and
+ after them, whatever its weights. Keys that several classes mapped to one collection declare are reported
+ once. Nothing is changed:
+ <a href='#buildIndex()'>buildIndex()</a> or <a href='#buildIndexAsync()'>buildIndexAsync()</a> creates them. Each named connection has its own
+ domain classes, so call this on <a href='#getDatastoreForConnection(java.lang.String)'>getDatastoreForConnection(String)</a> for those.
+ <DL><DT><B>Returns:</B></DT><DD>the missing indexes, collection by collection, in the order the domain classes declare them</DD></DL></p>
+ </li>
+ </ul>
+
+ <a name="findUndeclaredIndexes()"><!-- --></a>
+ <ul class="blockListLast">
+ <li class="blockList">
+ <h4>public java.util.List<<a href='../../../../../org/grails/datastore/mapping/mongo/UndeclaredIndex.html' title='UndeclaredIndex'>UndeclaredIndex</a>> <strong>findUndeclaredIndexes</strong>()</h4>
+ <p> Lists the indexes that no domain class declares, on the collections whose declared indexes
+ <a href='#buildIndex()'>buildIndex()</a> builds for this datastore's connection.
+
+ <p>An index is declared when a domain class mapped to the same collection declares its key pattern, the
+ same fields in the same order, with <CODE>compoundIndex</CODE>, <CODE>index</CODE> or a property's
+ <CODE>index: true</CODE>. Its name and options do not matter. A text index is declared when a class declares
+ text on the same fields, in any order, with the same keys before and after them; its weights do not
+ matter. The <CODE>_id</CODE> index is never reported, and
+ neither is any index on a collection that no domain class maps. An index that an
+ <a href='#initializeIndices(org.grails.datastore.mapping.model.PersistentEntity)'>initializeIndices(PersistentEntity)</a> override creates by itself is not a declaration, so it is
+ reported.
+
+ <p>Nothing is changed: see <a href='#dropUndeclaredIndexes()'>dropUndeclaredIndexes()</a>. Each named connection has its own domain
+ classes, so call this on <a href='#getDatastoreForConnection(java.lang.String)'>getDatastoreForConnection(String)</a> for those.
+ <DL><DT><B>Returns:</B></DT><DD>the undeclared indexes, collection by collection, in the order the server lists them</DD></DL></p>
+ </li>
+ </ul>
+
<a name="getApplicationEventPublisher()"><!-- --></a>
<ul class="blockListLast">
<li class="blockList">
diff --git a/docs/snapshot/grails-data/mongodb/api/org/grails/datastore/mapping/mongo/UndeclaredIndex.html b/docs/snapshot/grails-data/mongodb/api/org/grails/datastore/mapping/mongo/UndeclaredIndex.html
new file mode 100644
index 000000000000..788b191cc46e
--- /dev/null
+++ b/docs/snapshot/grails-data/mongodb/api/org/grails/datastore/mapping/mongo/UndeclaredIndex.html
@@ -0,0 +1,238 @@
+<!--
+
+ 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.
+
+-->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!-- **************************************************************** -->
+<!-- * PLEASE KEEP COMPLICATED EXPRESSIONS OUT OF THESE TEMPLATES, * -->
+<!-- * i.e. only iterate & print data where possible. Thanks, Jez. * -->
+<!-- **************************************************************** -->
+
+<html>
+<head>
+ <!-- Generated by groovydoc (5.1.3) -->
+ <title>UndeclaredIndex (GORM for MongoDB - 8.0.0-SNAPSHOT)</title>
+
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
+ <link href="../../../../../groovy.ico" type="image/x-icon" rel="icon">
+ <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
+
+<body class="center">
+<script type="text/javascript"><!--
+if (location.href.indexOf('is-external=true') == -1) {
+ parent.document.title="UndeclaredIndex (GORM for MongoDB - 8.0.0-SNAPSHOT)";
+}
+//-->
+</script>
+<noscript>
+ <div>JavaScript is disabled on your browser.</div>
+</noscript>
+<!-- ========= START OF TOP NAVBAR ======= -->
+<div class="topNav"><a name="navbar_top">
+ <!-- -->
+</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/UndeclaredIndex" target="_top">Frames</a></li>
+ <li><a href="UndeclaredIndex.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <a name="skip-navbar_top">
+ <!-- -->
+ </a></div>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<!-- ======== START OF CLASS DATA ======== -->
+<div class="header">
+
+ <div class="subTitle">Package: <strong>org.grails.datastore.mapping.mongo</strong></div>
+
+ <h2 title="[Java] Record UndeclaredIndex" class="title">[Java] Record UndeclaredIndex</h2>
+</div>
+<div class="contentContainer">
+<ul class="inheritance">
+<li><ul class="inheritance"></ul></li><li><ul class="inheritance"></ul></li><li>org.grails.datastore.mapping.mongo.UndeclaredIndex
+</ul>
+<div class="description">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+ <!-- todo: direct known subclasses -->
+ <hr>
+
+<pre>public record UndeclaredIndex
+extends java.lang.Record</pre>
+
+ <p> An index on a collection that domain classes map, whose keys none of those domain classes declares.
+ <DL><DT><B>Parameters:</B></DT><DD><code>database</code> - the database the collection is in</DD><DD><code>collection</code> - the collection the index is on</DD><DD><code>name</code> - the name of the index</DD><DD><code>key</code> - the index's key pattern, as <CODE>listIndexes</CODE> reports it</DD><DD><code>definition</code> - the whole index description <CODE>listIndexes</CODE> reports, options included</DD></DL><DL><DT><B>See Also:</B></DT><DD><a href='../../. [...]
+
+ </li>
+ </ul>
+</div>
+
+<div class="summary">
+ <ul class="blockList">
+ <li class="blockList">
+ <!-- =========== NESTED CLASS SUMMARY =========== -->
+
+
+ <!-- =========== ENUM CONSTANT SUMMARY =========== -->
+
+ <!-- =========== FIELD SUMMARY =========== -->
+
+
+ <!-- =========== PROPERTY SUMMARY =========== -->
+
+
+ <!-- =========== ELEMENT SUMMARY =========== -->
+
+
+
+
+
+ <!-- ========== METHOD SUMMARY =========== -->
+ <ul class="blockList">
+
+ <li class="blockList"><a name="method_summary"><!-- --></a>
+ <h3>Inherited Methods Summary</h3>
+ <ul class="blockList">
+ <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Inherited Methods Summary table">
+ <caption><span>Inherited Methods</span><span class="tabEnd"> </span></caption>
+ <tr>
+ <th class="colFirst" scope="col">Methods inherited from class</th>
+ <th class="colLast" scope="col">Name</th>
+ </tr>
+
+ <tr class="altColor">
+ <td class="colFirst"><code>class java.lang.Record</code></td>
+ <td class="colLast"><code>java.lang.Record#equals(java.lang.Object), java.lang.Record#getClass(), java.lang.Record#hashCode(), java.lang.Record#notify(), java.lang.Record#notifyAll(), java.lang.Record#toString(), java.lang.Record#wait(), java.lang.Record#wait(long), java.lang.Record#wait(long, int)</code></td>
+ </tr>
+ </table>
+ </ul>
+ </li>
+
+ </ul>
+
+ </li>
+ </ul>
+</div>
+
+<div class="details">
+ <ul class="blockList">
+ <li class="blockList">
+
+
+
+
+
+
+
+
+
+
+
+
+ </li>
+ </ul>
+</div>
+
+<!-- ========= END OF CLASS DATA ========= -->
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<div class="bottomNav"><a name="navbar_bottom">
+ <!-- -->
+</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
+ <!-- -->
+</a>
+ <ul class="navList" title="Navigation">
+ <li><a href="../../../../../overview-summary.html">Overview</a></li>
+ <li><a href="package-summary.html">Package</a></li>
+ <li class="navBarCell1Rev">Class</li>
+ <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+ <li><a href="../../../../../index-all.html">Index</a></li>
+ <li><a href="../../../../../help-doc.html">Help</a></li>
+ </ul>
+</div>
+
+<div class="subNav">
+ <div>
+ <ul class="navList">
+ <li><a href="../../../../../index.html?org/grails/datastore/mapping/mongo/UndeclaredIndex" target="_top">Frames</a></li>
+ <li><a href="UndeclaredIndex.html" target="_top">No Frames</a></li>
+ </ul>
+ </div>
+ <div>
+ <ul class="subNavList">
+ <li>Summary: </li>
+ Nested Field Method
+ </ul>
+ <ul class="subNavList">
+ <li> | Detail: </li>
+ Field Method
+ </ul>
+ </div>
+ <p><!-- Matomo -->
+<script>
+ var _paq = window._paq = window._paq || [];
+ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+ _paq.push(["setDoNotTrack", true]);
+ _paq.push(["disableCookies"]);
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="https://analytics.apache.org/";
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
+ _paq.push(['setSiteId', '79']);
+ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+ g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ })();
+</script>
+<!-- End Matomo Code --></p>
+ <a name="skip-navbar_bottom">
+ <!-- -->
+ </a>
+ </div>
+</div>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+</body>
+</html>
diff --git a/docs/snapshot/grails-data/mongodb/manual/index.html b/docs/snapshot/grails-data/mongodb/manual/index.html
index f0e91a528174..fbceeda02890 100644
--- a/docs/snapshot/grails-data/mongodb/manual/index.html
+++ b/docs/snapshot/grails-data/mongodb/manual/index.html
@@ -736,6 +736,30 @@ table.CodeRay td.code{padding:0 0 0 .75em}
<p>The index build reports what it created, what was already present and how long it took, in one summary line per build</p>
</li>
<li>
+<p><code>MongoDatastore.buildIndexAsync()</code> runs the index build in the background whatever <code>buildIndexesAsync</code> says, and returns a <code>CompletableFuture<IndexBuildResult></code> with the counts the summary line reports</p>
+</li>
+<li>
+<p><code>MongoDatastore.findMissingIndexes()</code> lists the indexes the domain classes declare that their collections do not have</p>
+</li>
+<li>
+<p><code>MongoDatastore.findUndeclaredIndexes()</code> lists the indexes on mapped collections that no domain class declares, and <code>MongoDatastore.dropUndeclaredIndexes()</code> drops them</p>
+</li>
+<li>
+<p>A <code>unique</code> index that cannot be built over existing duplicate values is counted as a failed declaration and the index build goes on, instead of ending the build and, when it is synchronous, startup. See <a href="#upgradeNotes">Upgrade Notes</a></p>
+</li>
+<li>
+<p>Each connection builds the indexes of the domain classes mapped to it. Previously a named connection also created the indexes, and the collection, of every class mapped only to another connection in its database. See <a href="#upgradeNotes">Upgrade Notes</a></p>
+</li>
+<li>
+<p>A domain class registered after startup is indexed on the collection and in the database its mapping names, and only when it is mapped to the default connection. Previously its indexes were built on the collection named after the class, in the default database, whatever its mapping and connection</p>
+</li>
+<li>
+<p>A property declared <code>index: true</code> in the mapping and also named in the constraints is indexed when the default constraints configure every property with <code>'*'</code>. Previously the constraints entry replaced the mapping’s, and the index was never created</p>
+</li>
+<li>
+<p>A property configured after a <code>'*'</code> entry in a <code>MappingBuilder.document { }</code> mapping keeps its configuration, such as <code>index: true</code>. Previously each such property was configured on a copy of the <code>'*'</code> entry that was never kept, so the configuration was lost</p>
+</li>
+<li>
<p>Inside a <code>withConnection</code> block, static methods called on the class and instance methods such as <code>save()</code> now use the block’s connection, as documented; previously only the methods called without naming the class did</p>
</li>
<li>
@@ -1133,6 +1157,21 @@ mongoClient.close() <span class="comment">// close the client you created</span
<p>No change is required when GORM creates the client itself — for example <code>new MongoDatastore(Person)</code>, or configuration-driven setups where GORM builds the client from <code>grails.mongodb.*</code> settings — because GORM continues to own and close those clients. A <code>MongoClient</code> registered as a Spring bean likewise continues to be closed by the <code>ApplicationContext</code>.</p>
</div>
</div>
+<div class="sect3">
+<h4 id="_a_unique_index_over_duplicate_values_no_longer_stops_the_index_build">A Unique Index Over Duplicate Values No Longer Stops the Index Build</h4>
+<div class="paragraph">
+<p>A declared <code>unique</code> index that cannot be built because documents in the collection already share a value used to end the index build with a <code>DuplicateKeyException</code>: the indexes declared after it were not built, and with the default synchronous build the application did not start. It is now handled like any other index the server refuses: logged at <code>ERROR</code> with the domain class and the duplicate key, counted as a failure in the build summary, which is l [...]
+</div>
+<div class="paragraph">
+<p>Remove the duplicates and build the index again, with <code>buildIndex()</code> or by restarting, to have it created. To keep refusing to run without it, check the result of <code>buildIndexAsync()</code> (see <a href="#buildIndexesOnDemand">Building Indexes on Demand</a>) and stop when <code>failures()</code> is not zero.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_a_connection_builds_only_the_indexes_of_the_classes_mapped_to_it">A Connection Builds Only the Indexes of the Classes Mapped to It</h4>
+<div class="paragraph">
+<p>The index build of each connection created the indexes declared by every domain class, including classes mapped only to another connection, so a class mapped to the default connection also had its collection and indexes created in the database of every named connection. Each connection now builds the indexes of the classes mapped to it: those that name it with <code>connection</code> or <code>connections</code>, those mapped to <code>ConnectionSource.ALL</code>, and, on the default co [...]
+</div>
+</div>
</div>
</div>
</div>
@@ -2689,7 +2728,7 @@ behaviour is unchanged.</p>
</div>
</div>
<div class="sect3">
-<h4 id="_reconciling_index_option_changes">Reconciling Index Option Changes</h4>
+<h4 id="reconcilingIndexOptions">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>
@@ -2713,7 +2752,7 @@ behaviour is unchanged.</p>
<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.
+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. The existing index is dropped first, so if the new one cannot be built — a <code>unique</code> index over documents that already share a value, say — the collection is left with no index on those keys. GORM logs that it dropped the index an [...]
</td>
</tr>
</table>
@@ -2821,6 +2860,44 @@ Because nothing is created at startup, a collection that has never been built wi
<div class="paragraph">
<p>A build requested after the datastore has been closed is not started, and one requested while it is stopped for a checkpoint runs when it is restarted.</p>
</div>
+<div class="paragraph">
+<p>To build in the background and still learn how the build went, call <code>buildIndexAsync()</code>. It runs the same build on the connection’s index build thread whatever <code>buildIndexesAsync</code> says, returns at once, and hands back a <code>CompletableFuture<IndexBuildResult></code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="groovy"><span class="keyword">import</span> <span class="include">org.grails.datastore.mapping.mongo.IndexBuildResult</span>
+
+IndexBuildResult result = mongoDatastore.buildIndexAsync().get()
+println <span class="string"><span class="delimiter">"</span><span class="inline"><span class="inline-delimiter">${</span>result.created()<span class="inline-delimiter">}</span></span><span class="content"> created, </span><span class="inline"><span class="inline-delimiter">${</span>result.alreadyPresent()<span class="inline-delimiter">}</span></span><span class="content"> already present, </span><span class="inline"><span class="inline-delimiter">${</span>result.failures()<span cla [...]
+</div>
+</div>
+<div class="paragraph">
+<p>The result carries the counts the summary line reports, and created and already-present indexes are always told apart, whatever the log level. A declaration that cannot be applied is counted in <code>failures()</code> and logged as it fails, and the future still completes; an exception that stops the build partway, such as a lost connection or a write concern the server could not satisfy, completes the future exceptionally instead. Builds on a connection run one at a time, so a build [...]
+</div>
+<div class="paragraph">
+<p>A declaration that fails does not fail startup, whatever the settings. To refuse to start without every declared index, wait for the build in <code>BootStrap</code> and stop on any failure. <code>BootStrap</code> runs before the application reports itself ready for traffic, and an exception thrown from it stops the application:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="groovy"><span class="keyword">import</span> <span class="include">org.grails.datastore.mapping.mongo.IndexBuildResult</span>
+<span class="keyword">import</span> <span class="include">org.grails.datastore.mapping.mongo.MongoDatastore</span>
+
+<span class="type">class</span> <span class="class">BootStrap</span> {
+
+ MongoDatastore mongoDatastore
+
+ <span class="keyword">def</span> init = { servletContext ->
+ IndexBuildResult result = mongoDatastore.buildIndexAsync().get()
+ <span class="keyword">if</span> (result.failures()) {
+ <span class="keyword">throw</span> <span class="keyword">new</span> <span class="exception">IllegalStateException</span>(<span class="string"><span class="delimiter">"</span><span class="inline"><span class="inline-delimiter">${</span>result.failures()<span class="inline-delimiter">}</span></span><span class="content"> declared index(es) could not be built</span><span class="delimiter">"</span></span>)
+ }
+ }
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p><code>get()</code> throws as well when an error stops the build. With <code>buildIndexes</code> left on, the startup build has already run by then, and this one confirms what it created and fails on the same declarations; set it to <code>false</code> to build only here.</p>
+</div>
</div>
</div>
<div class="sect3">
@@ -2850,12 +2927,12 @@ Because nothing is created at startup, a collection that has never been built wi
<p>A query issued before its index has been built is served without it — correctly, but with the performance of an unindexed query. The same applies to a <code>unique</code> index: it constrains nothing until the build finishes.</p>
</li>
<li>
-<p>Because startup no longer waits, a failure to build an index can no longer fail startup. It is logged at error level, and the application runs without that index. With the default synchronous build the exception propagates and the application does not start.</p>
+<p>Because startup no longer waits, an error that stops the build, such as a lost connection, can no longer fail startup. It is logged at error level, and the application runs without the indexes the build had not reached. With the default synchronous build that error propagates and the application does not start. A declaration the server refuses, such as a <code>unique</code> index over duplicate values, fails startup with neither setting: it is logged and counted, and the build goes on [...]
</li>
</ul>
</div>
<div class="paragraph">
-<p>The setting also applies with <code>buildIndexes</code> set to <code>false</code>, to the builds the application starts with <code>buildIndex()</code>. A domain class registered after startup is indexed on the thread registering it.</p>
+<p>The setting also applies with <code>buildIndexes</code> set to <code>false</code>, to the builds the application starts with <code>buildIndex()</code>. A domain class registered after startup is indexed on the thread registering it, once any build running on the connection has finished, and only when it is mapped to the default connection.</p>
</div>
<div class="admonitionblock note">
<table>
@@ -2895,6 +2972,9 @@ If the application shuts down while a background build is still running, GORM st
</div>
</div>
<div class="paragraph">
+<p>A declaration the server refuses does not end the build: an option conflict GORM is not authorised to resolve, an invalid specification, or a <code>unique</code> index over documents that already share a value is logged at <code>ERROR</code> as it fails and counted, and the build goes on with the remaining declarations. Only an error that stops the build itself ends it early: a lost connection, or a write concern the server could not satisfy, which leaves unknown whether the index was [...]
+</div>
+<div class="paragraph">
<p>If any declaration failed, the summary is logged at <code>WARN</code> instead and reports how many; the failures themselves are logged individually as they happen. A build that stops partway — a lost connection or a timeout — reports how far it got before stopping, also at <code>WARN</code>:</p>
</div>
<div class="listingblock">
@@ -2933,6 +3013,79 @@ If the application shuts down while a background build is still running, GORM st
</div>
</div>
<div class="sect3">
+<h4 id="missingIndexes">Finding Missing Indexes</h4>
+<div class="paragraph">
+<p>With <code>buildIndexes</code> off, a declared index exists only once something builds it, and nothing reports one that has not been built yet. <code>findMissingIndexes()</code> on the <code>MongoDatastore</code> bean lists the indexes the domain classes declare that their collections do not have, without changing anything. Logged at startup, it shows when a build has been forgotten:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="groovy"><span class="keyword">def</span> missing = mongoDatastore.findMissingIndexes()
+<span class="keyword">if</span> (missing) {
+ log.warn <span class="string"><span class="delimiter">"</span><span class="content">Declared indexes not built: </span><span class="inline"><span class="inline-delimiter">${</span>missing.collect { <span class="string"><span class="delimiter">"</span><span class="inline"><span class="inline-delimiter">${</span><span class="local-variable">it</span>.collection()<span class="inline-delimiter">}</span></span><span class="content"> </span><span class="inline"><span class="inlin [...]
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Each <code>MissingIndex</code> gives the database, the collection, the domain class declaring the index, its key pattern and the options declared with it. A declared index is present when its collection has an index on the same key pattern, the same fields in the same order, whatever its name and options: an option that differs is for the build to reconcile (see <a href="#reconcilingIndexOptions">Reconciling Index Option Changes</a>). A text index is present when one indexes the same [...]
+</div>
+</div>
+<div class="sect3">
+<h4 id="undeclaredIndexes">Finding and Dropping Undeclared Indexes</h4>
+<div class="paragraph">
+<p>GORM never drops an index. One that a mapping stops declaring, or declares again with its keys in another order, stays on the server, still maintained on every write. <code>findUndeclaredIndexes()</code> on the <code>MongoDatastore</code> bean lists them without changing anything:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="groovy"><span class="keyword">import</span> <span class="include">org.grails.datastore.mapping.mongo.MongoDatastore</span>
+<span class="keyword">import</span> <span class="include">org.grails.datastore.mapping.mongo.UndeclaredIndex</span>
+
+<span class="type">class</span> <span class="class">IndexMaintenanceService</span> {
+
+ MongoDatastore mongoDatastore
+
+ <span class="predefined-type">List</span><UndeclaredIndex> undeclaredIndexes() {
+ mongoDatastore.findUndeclaredIndexes()
+ }
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Each <code>UndeclaredIndex</code> gives the database, collection, name and key pattern of the index, and the whole description <code>listIndexes</code> returned for it, options included.</p>
+</div>
+<div class="paragraph">
+<p>An index counts as declared when a domain class mapped to its collection declares the same key pattern, the same fields in the same order, through <code>compoundIndex</code>, <code>index</code> or a property’s <code>index: true</code>. Its name and options do not matter: those differences are what the build reconciles (see <a href="#reconcilingIndexOptions">Reconciling Index Option Changes</a>). A text index counts as declared when a class declares text on the same fields, in an [...]
+</div>
+<div class="paragraph">
+<p><code>dropUndeclaredIndexes()</code> drops everything <code>findUndeclaredIndexes()</code> reports, logging each index at <code>INFO</code>, and returns what it dropped. To drop only some, pass the reviewed list to <code>dropUndeclaredIndexes(List)</code>. Each index is checked again before it is dropped, since the server can have changed since the list was made: an index or collection that has gone is skipped, and so, with a <code>WARN</code>, is an index whose name now belongs to an [...]
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="groovy"><span class="keyword">def</span> undeclared = mongoDatastore.findUndeclaredIndexes()
+mongoDatastore.dropUndeclaredIndexes(undeclared.findAll { <span class="local-variable">it</span>.collection() != <span class="string"><span class="delimiter">'</span><span class="content">auditLog</span><span class="delimiter">'</span></span> })</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Like the index build, each named connection covers its own domain classes, so call these through that connection’s datastore:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="groovy">mongoDatastore.getDatastoreForConnection(<span class="string"><span class="delimiter">'</span><span class="content">reporting</span><span class="delimiter">'</span></span>).findUndeclaredIndexes()</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">
+Drop indexes deliberately, once every instance of the application runs the release whose mappings declare the indexes to keep, and never automatically at startup. An instance still on an earlier release does not declare an index that a later release adds, or one created by hand ahead of a deployment, so to that instance those indexes are undeclared. An index that application code creates outside the mappings, by calling <code>createIndex</code> itself, is not a declaration either, and is [...]
+</td>
+</tr>
+</table>
+</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 83b19cb08de1..3ec684c9fd2d 100644
--- a/docs/snapshot/grails-data/mongodb/manual/introduction/releaseNotes.html
+++ b/docs/snapshot/grails-data/mongodb/manual/introduction/releaseNotes.html
@@ -475,6 +475,30 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<p>The index build reports what it created, what was already present and how long it took, in one summary line per build</p>
</li>
<li>
+<p><code>MongoDatastore.buildIndexAsync()</code> runs the index build in the background whatever <code>buildIndexesAsync</code> says, and returns a <code>CompletableFuture<IndexBuildResult></code> with the counts the summary line reports</p>
+</li>
+<li>
+<p><code>MongoDatastore.findMissingIndexes()</code> lists the indexes the domain classes declare that their collections do not have</p>
+</li>
+<li>
+<p><code>MongoDatastore.findUndeclaredIndexes()</code> lists the indexes on mapped collections that no domain class declares, and <code>MongoDatastore.dropUndeclaredIndexes()</code> drops them</p>
+</li>
+<li>
+<p>A <code>unique</code> index that cannot be built over existing duplicate values is counted as a failed declaration and the index build goes on, instead of ending the build and, when it is synchronous, startup. See <a href="#upgradeNotes">Upgrade Notes</a></p>
+</li>
+<li>
+<p>Each connection builds the indexes of the domain classes mapped to it. Previously a named connection also created the indexes, and the collection, of every class mapped only to another connection in its database. See <a href="#upgradeNotes">Upgrade Notes</a></p>
+</li>
+<li>
+<p>A domain class registered after startup is indexed on the collection and in the database its mapping names, and only when it is mapped to the default connection. Previously its indexes were built on the collection named after the class, in the default database, whatever its mapping and connection</p>
+</li>
+<li>
+<p>A property declared <code>index: true</code> in the mapping and also named in the constraints is indexed when the default constraints configure every property with <code>'*'</code>. Previously the constraints entry replaced the mapping’s, and the index was never created</p>
+</li>
+<li>
+<p>A property configured after a <code>'*'</code> entry in a <code>MappingBuilder.document { }</code> mapping keeps its configuration, such as <code>index: true</code>. Previously each such property was configured on a copy of the <code>'*'</code> entry that was never kept, so the configuration was lost</p>
+</li>
+<li>
<p>Inside a <code>withConnection</code> block, static methods called on the class and instance methods such as <code>save()</code> now use the block’s connection, as documented; previously only the methods called without naming the class did</p>
</li>
<li>
diff --git a/docs/snapshot/grails-data/mongodb/manual/introduction/upgradeNotes.html b/docs/snapshot/grails-data/mongodb/manual/introduction/upgradeNotes.html
index ba4d23b95525..a2bc2bc9ce89 100644
--- a/docs/snapshot/grails-data/mongodb/manual/introduction/upgradeNotes.html
+++ b/docs/snapshot/grails-data/mongodb/manual/introduction/upgradeNotes.html
@@ -629,6 +629,21 @@ mongoClient.close() // close the client you created</code></pre>
<p>No change is required when GORM creates the client itself — for example <code>new MongoDatastore(Person)</code>, or configuration-driven setups where GORM builds the client from <code>grails.mongodb.*</code> settings — because GORM continues to own and close those clients. A <code>MongoClient</code> registered as a Spring bean likewise continues to be closed by the <code>ApplicationContext</code>.</p>
</div>
</div>
+<div class="sect3">
+<h4 id="_a_unique_index_over_duplicate_values_no_longer_stops_the_index_build">A Unique Index Over Duplicate Values No Longer Stops the Index Build</h4>
+<div class="paragraph">
+<p>A declared <code>unique</code> index that cannot be built because documents in the collection already share a value used to end the index build with a <code>DuplicateKeyException</code>: the indexes declared after it were not built, and with the default synchronous build the application did not start. It is now handled like any other index the server refuses: logged at <code>ERROR</code> with the domain class and the duplicate key, counted as a failure in the build summary, which is l [...]
+</div>
+<div class="paragraph">
+<p>Remove the duplicates and build the index again, with <code>buildIndex()</code> or by restarting, to have it created. To keep refusing to run without it, check the result of <code>buildIndexAsync()</code> (see <a href="#buildIndexesOnDemand">Building Indexes on Demand</a>) and stop when <code>failures()</code> is not zero.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_a_connection_builds_only_the_indexes_of_the_classes_mapped_to_it">A Connection Builds Only the Indexes of the Classes Mapped to It</h4>
+<div class="paragraph">
+<p>The index build of each connection created the indexes declared by every domain class, including classes mapped only to another connection, so a class mapped to the default connection also had its collection and indexes created in the database of every named connection. Each connection now builds the indexes of the classes mapped to it: those that name it with <code>connection</code> or <code>connections</code>, those mapped to <code>ConnectionSource.ALL</code>, and, on the default co [...]
+</div>
+</div>
</div>
</div>
<div id="footer">
diff --git a/docs/snapshot/grails-data/mongodb/manual/querying/queryIndexes.html b/docs/snapshot/grails-data/mongodb/manual/querying/queryIndexes.html
index 6f5c7f549076..3369cd2d4b82 100644
--- a/docs/snapshot/grails-data/mongodb/manual/querying/queryIndexes.html
+++ b/docs/snapshot/grails-data/mongodb/manual/querying/queryIndexes.html
@@ -560,7 +560,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect3">
-<h4 id="_reconciling_index_option_changes">Reconciling Index Option Changes</h4>
+<h4 id="reconcilingIndexOptions">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>
@@ -584,7 +584,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<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.
+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. The existing index is dropped first, so if the new one cannot be built — a <code>unique</code> index over documents that already share a value, say — the collection is left with no index on those keys. GORM logs that it dropped the index an [...]
</td>
</tr>
</table>
@@ -692,6 +692,44 @@ class IndexMaintenanceService {
<div class="paragraph">
<p>A build requested after the datastore has been closed is not started, and one requested while it is stopped for a checkpoint runs when it is restarted.</p>
</div>
+<div class="paragraph">
+<p>To build in the background and still learn how the build went, call <code>buildIndexAsync()</code>. It runs the same build on the connection’s index build thread whatever <code>buildIndexesAsync</code> says, returns at once, and hands back a <code>CompletableFuture<IndexBuildResult></code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-groovy" data-lang="groovy">import org.grails.datastore.mapping.mongo.IndexBuildResult
+
+IndexBuildResult result = mongoDatastore.buildIndexAsync().get()
+println "${result.created()} created, ${result.alreadyPresent()} already present, ${result.failures()} failed"</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The result carries the counts the summary line reports, and created and already-present indexes are always told apart, whatever the log level. A declaration that cannot be applied is counted in <code>failures()</code> and logged as it fails, and the future still completes; an exception that stops the build partway, such as a lost connection or a write concern the server could not satisfy, completes the future exceptionally instead. Builds on a connection run one at a time, so a build [...]
+</div>
+<div class="paragraph">
+<p>A declaration that fails does not fail startup, whatever the settings. To refuse to start without every declared index, wait for the build in <code>BootStrap</code> and stop on any failure. <code>BootStrap</code> runs before the application reports itself ready for traffic, and an exception thrown from it stops the application:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-groovy" data-lang="groovy">import org.grails.datastore.mapping.mongo.IndexBuildResult
+import org.grails.datastore.mapping.mongo.MongoDatastore
+
+class BootStrap {
+
+ MongoDatastore mongoDatastore
+
+ def init = { servletContext ->
+ IndexBuildResult result = mongoDatastore.buildIndexAsync().get()
+ if (result.failures()) {
+ throw new IllegalStateException("${result.failures()} declared index(es) could not be built")
+ }
+ }
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p><code>get()</code> throws as well when an error stops the build. With <code>buildIndexes</code> left on, the startup build has already run by then, and this one confirms what it created and fails on the same declarations; set it to <code>false</code> to build only here.</p>
+</div>
</div>
</div>
<div class="sect3">
@@ -721,12 +759,12 @@ class IndexMaintenanceService {
<p>A query issued before its index has been built is served without it — correctly, but with the performance of an unindexed query. The same applies to a <code>unique</code> index: it constrains nothing until the build finishes.</p>
</li>
<li>
-<p>Because startup no longer waits, a failure to build an index can no longer fail startup. It is logged at error level, and the application runs without that index. With the default synchronous build the exception propagates and the application does not start.</p>
+<p>Because startup no longer waits, an error that stops the build, such as a lost connection, can no longer fail startup. It is logged at error level, and the application runs without the indexes the build had not reached. With the default synchronous build that error propagates and the application does not start. A declaration the server refuses, such as a <code>unique</code> index over duplicate values, fails startup with neither setting: it is logged and counted, and the build goes on [...]
</li>
</ul>
</div>
<div class="paragraph">
-<p>The setting also applies with <code>buildIndexes</code> set to <code>false</code>, to the builds the application starts with <code>buildIndex()</code>. A domain class registered after startup is indexed on the thread registering it.</p>
+<p>The setting also applies with <code>buildIndexes</code> set to <code>false</code>, to the builds the application starts with <code>buildIndex()</code>. A domain class registered after startup is indexed on the thread registering it, once any build running on the connection has finished, and only when it is mapped to the default connection.</p>
</div>
<div class="admonitionblock note">
<table>
@@ -766,6 +804,9 @@ If the application shuts down while a background build is still running, GORM st
</div>
</div>
<div class="paragraph">
+<p>A declaration the server refuses does not end the build: an option conflict GORM is not authorised to resolve, an invalid specification, or a <code>unique</code> index over documents that already share a value is logged at <code>ERROR</code> as it fails and counted, and the build goes on with the remaining declarations. Only an error that stops the build itself ends it early: a lost connection, or a write concern the server could not satisfy, which leaves unknown whether the index was [...]
+</div>
+<div class="paragraph">
<p>If any declaration failed, the summary is logged at <code>WARN</code> instead and reports how many; the failures themselves are logged individually as they happen. A build that stops partway — a lost connection or a timeout — reports how far it got before stopping, also at <code>WARN</code>:</p>
</div>
<div class="listingblock">
@@ -804,6 +845,79 @@ If the application shuts down while a background build is still running, GORM st
</div>
</div>
<div class="sect3">
+<h4 id="missingIndexes">Finding Missing Indexes</h4>
+<div class="paragraph">
+<p>With <code>buildIndexes</code> off, a declared index exists only once something builds it, and nothing reports one that has not been built yet. <code>findMissingIndexes()</code> on the <code>MongoDatastore</code> bean lists the indexes the domain classes declare that their collections do not have, without changing anything. Logged at startup, it shows when a build has been forgotten:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-groovy" data-lang="groovy">def missing = mongoDatastore.findMissingIndexes()
+if (missing) {
+ log.warn "Declared indexes not built: ${missing.collect { "${it.collection()} ${it.key().toJson()}" }}"
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Each <code>MissingIndex</code> gives the database, the collection, the domain class declaring the index, its key pattern and the options declared with it. A declared index is present when its collection has an index on the same key pattern, the same fields in the same order, whatever its name and options: an option that differs is for the build to reconcile (see <a href="#reconcilingIndexOptions">Reconciling Index Option Changes</a>). A text index is present when one indexes the same [...]
+</div>
+</div>
+<div class="sect3">
+<h4 id="undeclaredIndexes">Finding and Dropping Undeclared Indexes</h4>
+<div class="paragraph">
+<p>GORM never drops an index. One that a mapping stops declaring, or declares again with its keys in another order, stays on the server, still maintained on every write. <code>findUndeclaredIndexes()</code> on the <code>MongoDatastore</code> bean lists them without changing anything:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-groovy" data-lang="groovy">import org.grails.datastore.mapping.mongo.MongoDatastore
+import org.grails.datastore.mapping.mongo.UndeclaredIndex
+
+class IndexMaintenanceService {
+
+ MongoDatastore mongoDatastore
+
+ List<UndeclaredIndex> undeclaredIndexes() {
+ mongoDatastore.findUndeclaredIndexes()
+ }
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Each <code>UndeclaredIndex</code> gives the database, collection, name and key pattern of the index, and the whole description <code>listIndexes</code> returned for it, options included.</p>
+</div>
+<div class="paragraph">
+<p>An index counts as declared when a domain class mapped to its collection declares the same key pattern, the same fields in the same order, through <code>compoundIndex</code>, <code>index</code> or a property’s <code>index: true</code>. Its name and options do not matter: those differences are what the build reconciles (see <a href="#reconcilingIndexOptions">Reconciling Index Option Changes</a>). A text index counts as declared when a class declares text on the same fields, in an [...]
+</div>
+<div class="paragraph">
+<p><code>dropUndeclaredIndexes()</code> drops everything <code>findUndeclaredIndexes()</code> reports, logging each index at <code>INFO</code>, and returns what it dropped. To drop only some, pass the reviewed list to <code>dropUndeclaredIndexes(List)</code>. Each index is checked again before it is dropped, since the server can have changed since the list was made: an index or collection that has gone is skipped, and so, with a <code>WARN</code>, is an index whose name now belongs to an [...]
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-groovy" data-lang="groovy">def undeclared = mongoDatastore.findUndeclaredIndexes()
+mongoDatastore.dropUndeclaredIndexes(undeclared.findAll { it.collection() != 'auditLog' })</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Like the index build, each named connection covers its own domain classes, so call these through that connection’s datastore:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-groovy" data-lang="groovy">mongoDatastore.getDatastoreForConnection('reporting').findUndeclaredIndexes()</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">
+Drop indexes deliberately, once every instance of the application runs the release whose mappings declare the indexes to keep, and never automatically at startup. An instance still on an earlier release does not declare an index that a later release adds, or one created by hand ahead of a deployment, so to that instance those indexes are undeclared. An index that application code creates outside the mappings, by calling <code>createIndex</code> itself, is not a declaration either, and is [...]
+</td>
+</tr>
+</table>
+</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/whats-new-manual/index.html b/docs/snapshot/grails-data/whats-new-manual/index.html
index 58883670f22e..0cf39fc084b0 100644
--- a/docs/snapshot/grails-data/whats-new-manual/index.html
+++ b/docs/snapshot/grails-data/whats-new-manual/index.html
@@ -527,7 +527,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<div id="footer">
<div id="footer-text">
Version 8.0.0-SNAPSHOT<br>
-Last updated 2026-10-04 07:08:04 UTC
+Last updated 2026-10-04 14:34:45 UTC
</div>
</div>
</body>
diff --git a/docs/snapshot/guide/introduction.html b/docs/snapshot/guide/introduction.html
index 23e6a8fa514c..5d74db043981 100644
--- a/docs/snapshot/guide/introduction.html
+++ b/docs/snapshot/guide/introduction.html
@@ -860,6 +860,15 @@ automatically removes each document once it reaches the configured age:</p>
logging a conflict. A changed TTL is applied in place with MongoDB’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 class="paragraph">
+<p>GORM still never drops an index by itself. <code>MongoDatastore.findUndeclaredIndexes()</code> lists the indexes on mapped
+collections whose keys no domain class declares any longer, and <code>dropUndeclaredIndexes()</code> drops them, as a deliberate
+step once every instance runs the release that declares the indexes to keep. See the
+<a href="../grails-data/mongodb/manual/index.html#undeclaredIndexes">Finding and Dropping Undeclared Indexes</a> section of the GORM for MongoDB
+guide. <code>findMissingIndexes()</code> lists the declared indexes their collections do not have, which shows when a build has
+been forgotten with <code>buildIndexes</code> off, and <code>buildIndexAsync()</code> runs the index build in the background and returns a
+<code>CompletableFuture</code> of its result, for a caller that needs to know when the build finished and what it applied.</p>
+</div>
</div>
<div class="sect3">
<h4 id="_gorm_for_mongodb_and_spring_data_mongodb_interoperability">GORM for MongoDB and Spring Data MongoDB Interoperability</h4>
diff --git a/docs/snapshot/guide/single.html b/docs/snapshot/guide/single.html
index e875f9bc9e4b..5dd4e309dcca 100644
--- a/docs/snapshot/guide/single.html
+++ b/docs/snapshot/guide/single.html
@@ -1506,6 +1506,15 @@ automatically removes each document once it reaches the configured age:</p>
logging a conflict. A changed TTL is applied in place with MongoDB’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 class="paragraph">
+<p>GORM still never drops an index by itself. <code>MongoDatastore.findUndeclaredIndexes()</code> lists the indexes on mapped
+collections whose keys no domain class declares any longer, and <code>dropUndeclaredIndexes()</code> drops them, as a deliberate
+step once every instance runs the release that declares the indexes to keep. See the
+<a href="../grails-data/mongodb/manual/index.html#undeclaredIndexes">Finding and Dropping Undeclared Indexes</a> section of the GORM for MongoDB
+guide. <code>findMissingIndexes()</code> lists the declared indexes their collections do not have, which shows when a build has
+been forgotten with <code>buildIndexes</code> off, and <code>buildIndexAsync()</code> runs the index build in the background and returns a
+<code>CompletableFuture</code> of its result, for a caller that needs to know when the build finished and what it applied.</p>
+</div>
</div>
<div class="sect3">
<h4 id="_gorm_for_mongodb_and_spring_data_mongodb_interoperability">GORM for MongoDB and Spring Data MongoDB Interoperability</h4>
@@ -4688,6 +4697,14 @@ On GORM for MongoDB, a transactional service method called from another, or <cod
<p><strong>GORM for MongoDB rejects Map criterion values that contain <code>$</code> keys.</strong>
<code>findWhere</code>, <code>findAllWhere</code>, criteria queries, the <code>where</code> DSL and dynamic finders now throw <code>InvalidDataAccessResourceUsageException</code> when a <code>Map</code> passed as a criterion value contains a key starting with <code>$</code> at any level, on any property type including enums. MongoDB interprets such a value document as an operator expression rather than as a value. Maps without such keys are still sent as literal subdocument comparisons, [...]
</li>
+<li>
+<p><strong>GORM for MongoDB no longer ends the index build on a <code>unique</code> index over duplicate values.</strong>
+A declared <code>unique</code> index that could not be built because documents already shared a value ended the index build with a <code>DuplicateKeyException</code>: the indexes declared after it were not built, and with the default synchronous build the application did not start. It is now counted as a failed declaration like any other index the server refuses, logged at <code>ERROR</code>, and the build goes on; the application starts without that index. Remove the duplicates and buil [...]
+</li>
+<li>
+<p><strong>GORM for MongoDB builds only the indexes of the domain classes mapped to each connection.</strong>
+The index build of a named connection also created the indexes of classes mapped only to another connection, in its own database. Each connection now builds the indexes of the classes mapped to it, including those mapped to <code>ConnectionSource.ALL</code>. Indexes already created elsewhere are left in place. See <a href="../grails-data/mongodb/manual/index.html#upgradeNotes">Upgrade Notes</a> in the GORM for MongoDB guide.</p>
+</li>
</ul>
</div>
</div>
diff --git a/docs/snapshot/guide/upgrading.html b/docs/snapshot/guide/upgrading.html
index 72a285486dc5..4f08b63d2123 100644
--- a/docs/snapshot/guide/upgrading.html
+++ b/docs/snapshot/guide/upgrading.html
@@ -1511,6 +1511,14 @@ On GORM for MongoDB, a transactional service method called from another, or <cod
<p><strong>GORM for MongoDB rejects Map criterion values that contain <code>$</code> keys.</strong>
<code>findWhere</code>, <code>findAllWhere</code>, criteria queries, the <code>where</code> DSL and dynamic finders now throw <code>InvalidDataAccessResourceUsageException</code> when a <code>Map</code> passed as a criterion value contains a key starting with <code>$</code> at any level, on any property type including enums. MongoDB interprets such a value document as an operator expression rather than as a value. Maps without such keys are still sent as literal subdocument comparisons, [...]
</li>
+<li>
+<p><strong>GORM for MongoDB no longer ends the index build on a <code>unique</code> index over duplicate values.</strong>
+A declared <code>unique</code> index that could not be built because documents already shared a value ended the index build with a <code>DuplicateKeyException</code>: the indexes declared after it were not built, and with the default synchronous build the application did not start. It is now counted as a failed declaration like any other index the server refuses, logged at <code>ERROR</code>, and the build goes on; the application starts without that index. Remove the duplicates and buil [...]
+</li>
+<li>
+<p><strong>GORM for MongoDB builds only the indexes of the domain classes mapped to each connection.</strong>
+The index build of a named connection also created the indexes of classes mapped only to another connection, in its own database. Each connection now builds the indexes of the classes mapped to it, including those mapped to <code>ConnectionSource.ALL</code>. Indexes already created elsewhere are left in place. See <a href="../grails-data/mongodb/manual/index.html#upgradeNotes">Upgrade Notes</a> in the GORM for MongoDB guide.</p>
+</li>
</ul>
</div>
</div>