Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCSP-33429: atlas search idx mgmt #144

Merged
merged 5 commits into from
Jan 16, 2024

Conversation

rustagir
Copy link
Collaborator

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-33429
Staging:
https://preview-mongodbrustagir.gatsbyjs.io/kotlin/DOCSP-33429-atlas-search-idx-mgmt/fundamentals/indexes/#atlas-search-indexes

Self-Review Checklist

  • Is this free of any warnings or errors in the RST?
  • Did you run a spell-check?
  • Did you run a grammar-check?
  • Are all the links working?
  • Are the facets and meta keywords accurate?

Copy link
Collaborator

@mongoKart mongoKart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome + clear work. a couple of very small issues and suggestions


Indexes support the efficient execution of queries in MongoDB. Without indexes, MongoDB must scan *every* document in a
collection (a **collection scan**) to find the documents that match each query. These collection scans are slow and can
negatively affect the performance of your application. If an appropriate index exists for a query, MongoDB can use the
index to limit the number of documents it must inspect.
index to limit the documents it must inspect.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

S: clarity

Suggested change
index to limit the documents it must inspect.
index to limit the documents the query must inspect.

source/fundamentals/indexes.txt Show resolved Hide resolved
- Options that affect the query's execution (e.g. read concern)
- Projection criteria to specify the fields MongoDB should return (optional)
- Sort criteria to specify the order documents will be returned from MongoDB (optional)
- Options that affect the query's execution, such as read concern
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Options that affect the query's execution, such as read concern
- Options that affect the query's execution, such as the read concern

@@ -57,24 +67,26 @@ from the index, also called a **covered query**.

name_1_age_-1

MongoDB would use this index when you sort your data by either:
MongoDB uses this index when you sort your data by either:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I: avoid fragments to introduce lists

S:

Suggested change
MongoDB uses this index when you sort your data by either:
MongoDB uses this index when you sort your data in one of the following ways:

Comment on lines 84 to 89
To improve query performance, build indexes on fields that appear often in
your application's queries and operations that return sorted results. Each
index that you add consumes disk space and memory when active, so we recommend
that you track index memory and disk usage for capacity planning. In addition,
when a write operation updates an indexed field, MongoDB updates the related
index.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

S: i have trouble connecting the reasons and recommendations here. what about something like this:

Suggested change
To improve query performance, build indexes on fields that appear often in
your application's queries and operations that return sorted results. Each
index that you add consumes disk space and memory when active, so we recommend
that you track index memory and disk usage for capacity planning. In addition,
when a write operation updates an indexed field, MongoDB updates the related
index.
You can optimize your application's use of indexes by following these guidelines:
- Track index memory and disk usage for capacity planning. Each index that you add consumes disk space and memory when active.
- To improve query performance, build indexes on fields that appear often in
your application's queries and operations that return sorted results.
- Avoid adding indexes to rarely used fields. When a write operation updates an indexed field, MongoDB also updates the related index.

Edit as you like!

Comment on lines 219 to 220
collections hosted on MongoDB Atlas. The indexes specify the behavior of
the search and which fields to index.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I: This sentence doesn't make sense to me--how indexes specify which fields to index. Can you clarify?


.. note::

The Atlas Search Index management methods run asynchronously. The
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

S: Guessing "Atlas Search Index" isn't a proper noun phrase? Would lowercase + hyphenate the compound modifier

Suggested change
The Atlas Search Index management methods run asynchronously. The
The Atlas Search index-management methods run asynchronously. The

Comment on lines 248 to 250
You can use the `createSearchIndex() <{+api+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/create-search-index.html>`__
and the
`createSearchIndexes() <{+api+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/create-search-indexes.html>`__
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

S: ditch the first "the" if you're using "method" just once

Suggested change
You can use the `createSearchIndex() <{+api+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/create-search-index.html>`__
and the
`createSearchIndexes() <{+api+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/create-search-indexes.html>`__
You can use the `createSearchIndex() <{+api+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/create-search-index.html>`__
and
`createSearchIndexes() <{+api+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/create-search-indexes.html>`__

Comment on lines 268 to 271
method to return the Atlas Search indexes of a collection.

The following code example shows how to print a list of the search indexes of
a collection:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

S: "indexes of a collection" vs. "indexes for a collection"?

mentioning here, but i trust your judgment!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on

in the preceding code snippet:
.. important::

Attempting to create a geospatial index on a field that is covered by a geospatial index results in an error.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

S: Clearer to include "already"? I assume that's what this means

Suggested change
Attempting to create a geospatial index on a field that is covered by a geospatial index results in an error.
Attempting to create a geospatial index on a field that is already covered by a geospatial index results in an error.

Copy link
Collaborator

@mongoKart mongoKart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lookin real good. couple small suggestions but LGTM

Comment on lines 87 to 88
The following guidelines describe how you can optimize the way
application uses indexes:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The following guidelines describe how you can optimize the way
application uses indexes:
The following guidelines describe how you can optimize the way
your application uses indexes:

<{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Indexes.html>`__
class to create and manage indexes. This class includes static
factory methods to create index specification documents for different
MongoDB Index key types.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: lower case?

Suggested change
MongoDB Index key types.
MongoDB index key types.

Comment on lines 280 to 281
The following code example shows how to print a list of the search indexes of
a collection:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on your comment, I thought you were changing from "of" to "on" (just making sure you didn't intend to make this change)

Copy link
Collaborator Author

@rustagir rustagir Jan 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AH, changed in one place but not the other.

type, see the MongoDB server manual page on :manual:`GeoJSON objects </reference/geojson>`.
To create a ``2dsphere`` index, you must specify a field that contains
only **GeoJSON objects**. To learn more about this
type, see the :manual:`GeoJSON objects reference </reference/geojson>`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type, see the :manual:`GeoJSON objects reference </reference/geojson>`
type, see :manual:`GeoJSON objects</reference/geojson>`

@rustagir rustagir merged commit 1784061 into mongodb:master Jan 16, 2024
5 checks passed
@docs-builder-bot
Copy link
Collaborator

rustagir added a commit that referenced this pull request Jan 16, 2024
* DOCSP-33429: (wip) atlas search idx mgmt

* DOCSP-33429: atlas search idx mgmt

* fixes

* MW PR fixes 1

* MW PR Small fixes

(cherry picked from commit 1784061)
ccho-mongodb pushed a commit to ccho-mongodb/docs-kotlin that referenced this pull request Feb 14, 2024
* DOCSP-33429: (wip) atlas search idx mgmt

* DOCSP-33429: atlas search idx mgmt

* fixes

* MW PR fixes 1

* MW PR Small fixes
ccho-mongodb pushed a commit to ccho-mongodb/docs-kotlin that referenced this pull request Feb 14, 2024
* DOCSP-33429: (wip) atlas search idx mgmt

* DOCSP-33429: atlas search idx mgmt

* fixes

* MW PR fixes 1

* MW PR Small fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants