Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

Conversation

shuangela
Copy link
Collaborator

@shuangela shuangela commented Apr 14, 2025

DESCRIPTION

Adds details on regex syntax in c2c

STAGING

https://deploy-preview-731--docs-cluster-to-cluster-sync.netlify.app/reference/collection-level-filtering/
https://deploy-preview-731--docs-cluster-to-cluster-sync.netlify.app/reference/collection-level-filtering/filter-regex/

JIRA

https://jira.mongodb.org/browse/DOCSP-37757

SELF-REVIEW CHECKLIST

  • Does each file have 3-5 taxonomy facet tags?
    See the taxonomy tagging instructions and this example PR
  • Is this free of any warnings or errors in the RST?
  • Is this free of spelling errors?
  • Is this free of grammatical errors?
  • Is this free of staging / rendering issues?
  • Are all the links working?

EXTERNAL REVIEW REQUIREMENTS

What's expected of an external reviewer?

Copy link

netlify bot commented Apr 14, 2025

Deploy Preview for docs-cluster-to-cluster-sync ready!

Name Link
🔨 Latest commit d204bc9
🔍 Latest deploy log https://app.netlify.com/sites/docs-cluster-to-cluster-sync/deploys/680018c380af2c0008305e77
😎 Deploy Preview https://deploy-preview-731--docs-cluster-to-cluster-sync.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@jwilson-mdb jwilson-mdb left a comment

Choose a reason for hiding this comment

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

Thanks @shuangela, LGTM! One small optional suggestion

Comment on lines 88 to 89
To learn more about syntax for ``pattern`` and ``options`` for regular
expression filtering, see :ref:`c2c-filter-regex`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

[optional / suggestion] (brevity)
Optional edit to trim this sentence by a couple of words

Suggested change
To learn more about syntax for ``pattern`` and ``options`` for regular
expression filtering, see :ref:`c2c-filter-regex`.
To learn more about the ``pattern`` and ``options`` regular expression syntax, see :ref:`c2c-filter-regex`.

Copy link
Contributor

@FGasper FGasper left a comment

Choose a reason for hiding this comment

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

Besides the notes here, it seems advantageous also to give examples, esp. of a case with multiple regexp options.

@@ -36,6 +36,61 @@ you can use regular expressions:
}
}

The regular expression pattern you pass into a filter must follow the :query:`regex <$regex>` syntax supported by the MongoDB server.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just link to the server’s own regexp docs? That seems better than duplicating the information here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The :query:regex <$regex> section does link out to the server's own regex docs, but I can also remove the options section and also link out to the server regex docs as the options are the same as the server regex docs!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To address your overarching comment about adding an example, there is an example on the filter-regex page of matching with multiple regex options, but I tried to make the lead in text clearer for it and added a better title to make that more clear.

@@ -36,6 +36,61 @@ you can use regular expressions:
}
}

The regular expression pattern you pass into a filter must follow the :query:`regex <$regex>` syntax supported by the MongoDB server.

Regular expressions in filter documents use the following ``options``:
Copy link
Contributor

Choose a reason for hiding this comment

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

It’d be good to clarify that options is a string of concatenated options.

@shuangela shuangela requested a review from FGasper April 16, 2025 20:52
Copy link
Contributor

@FGasper FGasper left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you!

@shuangela shuangela merged commit e9b2180 into mongodb:master Apr 24, 2025
4 checks passed
shuangela added a commit to shuangela/docs-cluster-to-cluster-sync that referenced this pull request Apr 24, 2025
* add regex info

* change wording

* expression

* wording

* jw feedback

* add information

* add info

* info

* remove options

(cherry picked from commit e9b2180)
shuangela added a commit to shuangela/docs-cluster-to-cluster-sync that referenced this pull request Apr 24, 2025
* add regex info

* change wording

* expression

* wording

* jw feedback

* add information

* add info

* info

* remove options

(cherry picked from commit e9b2180)
@shuangela
Copy link
Collaborator Author

💚 All backports created successfully

Status Branch Result
v1.13
v1.12
v1.11

Questions ?

Please refer to the Backport tool documentation

shuangela added a commit to shuangela/docs-cluster-to-cluster-sync that referenced this pull request Apr 24, 2025
* add regex info

* change wording

* expression

* wording

* jw feedback

* add information

* add info

* info

* remove options

(cherry picked from commit e9b2180)
shuangela added a commit that referenced this pull request Apr 24, 2025
* add regex info

* change wording

* expression

* wording

* jw feedback

* add information

* add info

* info

* remove options

(cherry picked from commit e9b2180)
shuangela added a commit that referenced this pull request Apr 24, 2025
* add regex info

* change wording

* expression

* wording

* jw feedback

* add information

* add info

* info

* remove options

(cherry picked from commit e9b2180)
shuangela added a commit that referenced this pull request Apr 24, 2025
* add regex info

* change wording

* expression

* wording

* jw feedback

* add information

* add info

* info

* remove options

(cherry picked from commit e9b2180)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants