-
Notifications
You must be signed in to change notification settings - Fork 16
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
DOCSP-33429: atlas search idx mgmt #144
Conversation
There was a problem hiding this 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
source/fundamentals/indexes.txt
Outdated
|
||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S: clarity
index to limit the documents it must inspect. | |
index to limit the documents the query must inspect. |
source/fundamentals/indexes.txt
Outdated
- 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Options that affect the query's execution, such as read concern | |
- Options that affect the query's execution, such as the read concern |
source/fundamentals/indexes.txt
Outdated
@@ -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: |
There was a problem hiding this comment.
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:
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: |
source/fundamentals/indexes.txt
Outdated
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. |
There was a problem hiding this comment.
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:
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!
source/fundamentals/indexes.txt
Outdated
collections hosted on MongoDB Atlas. The indexes specify the behavior of | ||
the search and which fields to index. |
There was a problem hiding this comment.
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?
source/fundamentals/indexes.txt
Outdated
|
||
.. note:: | ||
|
||
The Atlas Search Index management methods run asynchronously. The |
There was a problem hiding this comment.
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
The Atlas Search Index management methods run asynchronously. The | |
The Atlas Search index-management methods run asynchronously. The |
source/fundamentals/indexes.txt
Outdated
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>`__ |
There was a problem hiding this comment.
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
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>`__ |
source/fundamentals/indexes.txt
Outdated
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: |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on
source/fundamentals/indexes.txt
Outdated
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. |
There was a problem hiding this comment.
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
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. |
There was a problem hiding this 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
source/fundamentals/indexes.txt
Outdated
The following guidelines describe how you can optimize the way | ||
application uses indexes: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: |
source/fundamentals/indexes.txt
Outdated
<{+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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: lower case?
MongoDB Index key types. | |
MongoDB index key types. |
source/fundamentals/indexes.txt
Outdated
The following code example shows how to print a list of the search indexes of | ||
a collection: |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
source/fundamentals/indexes.txt
Outdated
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>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type, see the :manual:`GeoJSON objects reference </reference/geojson>` | |
type, see :manual:`GeoJSON objects</reference/geojson>` |
✨ Staging URL: https://preview-mongodbmongodb.gatsbyjs.io/kotlin/master/ 🪵 Logs |
* 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)
* DOCSP-33429: (wip) atlas search idx mgmt * DOCSP-33429: atlas search idx mgmt * fixes * MW PR fixes 1 * MW PR Small fixes
* DOCSP-33429: (wip) atlas search idx mgmt * DOCSP-33429: atlas search idx mgmt * fixes * MW PR fixes 1 * MW PR Small fixes
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