-
Notifications
You must be signed in to change notification settings - Fork 29
DOCSP-42743 Collection config #95
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-42743 Collection config #95
Conversation
✅ Deploy Preview for docs-mongoid ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
a few things!
source/configuration.txt
Outdated
application to use a forking web server. | ||
|
||
- :ref:`mongoid-collection-config`: Learn how to specify configuration options | ||
for a collection in your application. |
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.
for a collection in your application. | |
for a MongoDB collection in your application. |
You can specify configuration options for a collection by using the | ||
``:collection_options`` argument with the ``store_in`` | ||
macro. The ``:collection_options`` argument accepts any collection option that | ||
your driver and server version supports. |
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.
your driver and server version supports. | |
your {+ruby-driver+} and MongoDB server version supports. |
To apply the collection options, your collection must be explicitly created | ||
prior to use. To learn how to create a collection using a Rake task, see 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.
To apply the collection options, your collection must be explicitly created | |
prior to use. To learn how to create a collection using a Rake task, see the | |
You must explicitly create a collection before you apply any collection options. To learn | |
how to create a collection by using a Rake task, see the |
|
||
To apply the collection options, your collection must be explicitly created | ||
prior to use. To learn how to create a collection using a Rake task, see the | ||
:ref:`mongoid-create-collection-rake` section of this guide. |
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: consider linking to docs in server or atlas about creating collections.
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.
Ended up rewording this section to better match what the original docs were saying. It says that it "should be done" by the Rake task so it seems to me like they want to point users that way rather than other ways of creating collection
The following sections show examples of how to configure collection options with | ||
{+odm+}. |
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 sections show examples of how to configure collection options with | |
{+odm+}. | |
The following sections show examples of how to configure collection options when using | |
{+odm+}. |
Time series collections efficiently store sequences of measurements over a | ||
period of time. The following example shows how to configure a time series | ||
collection with | ||
{+odm+}: |
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: could be helpful to describe what the options in the code are doing. Or you can link out to docs on time series collections or both ideally
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 linked out to the manual for descriptions since the functionality of the collection isn't the focus of this page
Capped collections have maximum size or document counts that prevent them from | ||
growing beyond maximum thresholds. The following example shows how to configure | ||
a capped collection with {+odm+}: |
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.
Capped collections have maximum size or document counts that prevent them from | |
growing beyond maximum thresholds. The following example shows how to configure | |
a capped collection with {+odm+}: | |
Capped collections have maximum size or document counts that prevent them from | |
growing beyond a specified threshold. The following example shows how to configure | |
a capped collection: |
particular natural language. The following example shows how to specify a | ||
default collation to use on a | ||
collection with {+odm+}: | ||
|
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: same comment about explaining + linking
# start-capped-collection-config | ||
class Name | ||
include Mongoid::Document | ||
|
||
store_in collection_options: { | ||
capped: true, | ||
size: 1024 | ||
} | ||
end | ||
# end-capped-collection-config | ||
|
||
# start-default-collation-config | ||
class Name | ||
include Mongoid::Document | ||
|
||
store_in collection_options: { | ||
collation: { | ||
locale: 'fr' | ||
} | ||
} | ||
end | ||
# end-default-collation-config No newline at end of file |
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: consider renaming these models as Name
isnt very clear that its not a placeholder
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.
lgtm!
* DOCSP-42732: qs * fix * wip * remove action * NR suggestion * DOCSP-42732: qs download * wip * adapt for sinatra * vale fix * snooty landing page * MW PR fixes 1 * DOCSP-42733: atlas prep qs * MW PR fixes 1 * DOCSP-42735: configure cxn * small fix - vale * JS PR fixes 1 * DOCSP-44008: read/write sinatra quickstart * fixes * NR PR fixes 1 * DOCSP-43961: rails qs * vale * ordering * small fix * MW PR fixes 1 * small fixes * MW PR fixes 2 * DOCSP-44647: add to existing app * fix vale action * vale fixes * depth * MW PR fixes 1 * fixes * DOCSP-42745: interact with data drawer * tags * fix vale action * remove extra word Co-authored-by: Nora Reidy <nora.reidy@mongodb.com> * DOCSP-42753: specify query part 1 * vale * title * code edits * MW PR fixes 2 * DOCSP-44849: modify results * vale * JS PR fixes 1 * fix * fix * list fixes * MW PR fixes 1 * DOCSP-44954: scoping * add landing page * link * vale * highlighting * DOCSP-44821: specify a query pt 2 * MR PR fixes 1 * wip * wip * wip * small fixes * DOCSP-42767 Aggregation (#57) * DOCSP-42774: transactions * vale * link text * MW PR fixes 1 * MR PR fixes 1 * DOCSP-45306: model data drawer * DOCSP-45330: inheritance (WIP) * MR PR fixes 2 * try using roles * wip * vale * add label * fixes * fix * small fixes - MW * DOCSP-45358: documents * fix * wip * wip * DR tech review 1 * page fmt * page fmt * SA PR fixes 1 * MR PR fixes 1 * DR small fix Co-authored-by: Dmitry Rybakov <160598371+comandeo-mongo@users.noreply.github.com> * DOCSP-45360: nested attributes (#71) * DOCSP-45360: nested attributes * vale + fixes * fixes * NR PR fixes 1 * DOCSP-45362: text search (#72) * DOCSP-45362: text search * wip * vale * MM PR fixes 1 * DOCSP-45436 Field Behaviors page (#68) * DOCSP-45363: validation (#73) * DOCSP-45363: validation * keywords * wip * SA PR fixes 1 * DOCSP-44794 Field Types (#69) * DOCSP-45357 Sharding Configuration (#76) * DOCSP-42762: Indexes (#74) * DOCSP-45367 Associations pt. 1 (#79) * DOCSP-45368: Persistence Configuration (#77) * DOCSP-45361: callbacks (#75) * DOCSP-45361: callbacks * wip * wip * wip * NR PR fixes 1 * DOCSP-45364: CRUD pt 1 (#81) * checkpoint * checkpoint 2 * woohoo first pass * indent * Edits * updates * vale chekcs * RR PR fixes 1 * fix code file * code fixes * RM PR fixes 1 --------- Co-authored-by: rustagir <rea.rustagi@mongodb.com> * DOCSP-45110: queries subsections (#80) * DOCSP-45110: queries misc sections * wip: * vale * MR PR fixes 1 * GM PR fixes 1 * DOCSP-46072 Associations part 2 (#82) * DOCSP-46394: CRUD remaining sections (#83) * DOCSP-46394: CRUD remaining sections * vale fixes * JS PR fixes 1 * DOCSP-46213: bump to rails 8 and remove old tuts (#84) * DOCSP-45356: i&h + code doc (#86) * DOCSP-45356: i&h + code doc * remove contributing * vale fixes * link fix * vale fixes + RM comment * DOCSP-42770: release notes/whats new (#87) * DOCSP-42770: release notes/whats new * fixes * fixes * DOCSP-42773: api links (#88) * DOCSP-42773: api links * fix * link fixes * DOCSP-42772: compatibility (#90) * DOCSP-42772: compatibility * small fix * small fix * SA PR fixes 1 * delete files for old build system * column width adjustment * DOCSP-45366 Encryption (#89) * DOCSP-42741: config pages (#91) * DOCSP-42741: config * wip * wip * some vale fixes * RM PR fixes 1 * small fix * DOCSP-46555: rails integration (#92) * wip * DOCSP-46555: rails integration * RM PR fixes 1 * DOCSP-45359 External Resources (#94) * add additional resources page * edits * feedback * DOCSP-42743 Collection config (#95) * DOCSP-42730: landing page (#96) * DOCSP-42730: landing page * MW PR fixes 1 * small fix * small fix * small fix * DOCSP-46121: cleanup (#97) * cleanup * copy compat action * redirects * MW PR fixes 1 * add index section * change vs in redirects --------- Co-authored-by: Nora Reidy <nora.reidy@mongodb.com> Co-authored-by: Jordan Smith <45415425+jordan-smith721@users.noreply.github.com> Co-authored-by: Dmitry Rybakov <160598371+comandeo-mongo@users.noreply.github.com> Co-authored-by: Maya Raman <maya.raman19@gmail.com>
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-42743
Staging - https://deploy-preview-95--docs-mongoid.netlify.app/configuration/collection-config/
Self-Review Checklist