-
Notifications
You must be signed in to change notification settings - Fork 28
Polish Atlas search docs #367
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
Conversation
85e19a1
to
0fcd033
Compare
docs/source/ref/models/search.rst
Outdated
- ``path`` (``str`` or :class:`~django.db.models.F`): The document path | ||
to the field. |
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 think we concluded there is no advantage to passing an F (really the semantics are incorrect since F("column")
is supposed to refer to the value of the column rather than the column itself.) Even if this is what's done behind the scenes, there's no reason to suggest the user should do this.
docs/source/ref/models/search.rst
Outdated
- ``value`` (``bool``, :class:`~bson.objectid.ObjectId`, ``int``, | ||
:class:`~datetime.datetime`, ``str``, :class:`~uuid.UUID`, ``None``, or | ||
:class:`~django.db.models.Value`): The value to match. |
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 don't find this typing documentation very attractive. Basically, the expected type is based on the value of the field. I think it's intuitive without this long list.
docs/source/ref/models/search.rst
Outdated
- ``path`` (``str`` or :class:`~django.db.models.F`): The document path | ||
to the field. | ||
- ``query`` (``str``, :class:`~django.db.models.Value`): The value to match. | ||
- ``fuzzy`` (:class:`~typing.Optional`\[:class:`~typing.Dict`\]): Fuzzy |
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.
Similarly, I'm used to reading "A dictionary" rather than "Optiona[Dict]". The former just seems friendlier to me. I guess it's a matter of preference, but my vote is to follow Django's style.
docs/source/ref/models/search.rst
Outdated
terms matching a pattern with ``*`` (any sequence of characters) and ``?`` | ||
(any single character) wildcards. |
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.
You've rewrapped some lines that according to my calculations were 79 characters in length. That's the limit, not 78. :-)
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 spacebar counts as 1.
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.
Which space are you referring to?
>>> len("terms matching a pattern with ``*`` (any sequence of characters) and ``?`` (any")
79
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.
mmh I counted it wrongly
7659e07
to
4897344
Compare
docs/source/ref/models/search.rst
Outdated
- ``match_criteria``: Whether to match ``"all"`` or ``"any"`` terms (defaults | ||
to Atlas Search behavior). |
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.
Inadvertently deleted?
docs/source/ref/models/search.rst
Outdated
|
||
Combinable expressions | ||
---------------------- | ||
``Combinable expressions`` |
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.
why backticks? The other headings only have it because they're classes
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.
It appeared a little big in the table content in relation to the others.
09cffc1
to
3cc1e00
Compare
Co-authored-by: Tim Graham <[email protected]>
3cc1e00
to
699b9d2
Compare
No description provided.