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

[C#] Code Snippet for Atlas Search Autocomplete doesn't work #177

Merged
merged 5 commits into from
Mar 15, 2024

Conversation

rachel-mack
Copy link
Collaborator

@rachel-mack rachel-mack commented Mar 4, 2024

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-37267
Staging - https://docs-mongodbcom-staging.corp.mongodb.com/csharp/docsworker-xlarge/DOCSP-37267/fundamentals/atlas-search/#std-label-csharp-atlas-search

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

@rustagir rustagir left a comment

Choose a reason for hiding this comment

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

requesting changes because of a question

source/fundamentals/atlas-search.txt Show resolved Hide resolved
Comment on lines 110 to 111
If the field you are searching has a search index, it must be included in your ``Autocomplete`` call:
``Search.Autocomplete(g => g.Make, "Gib"), indexName: <make_search_index>)``
Copy link
Collaborator

Choose a reason for hiding this comment

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

Q: Is this issue unique to the Autocomplete() Search method? Can you please check with the Pm to verify if all of the code examples used on this page need to include the search index name?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

According to the PM, yes, this is specific to Autocomplete and he did test all the methods except the Geo ones.

Copy link
Collaborator

Choose a reason for hiding this comment

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

After reading the code example, I feel like the actual code example used in this section should be updated as well. The note could clarify that compared to the other examples, where the default index is used in the absence of the index name, this example explicitly requires the index name.

@rachel-mack rachel-mack requested a review from rustagir March 5, 2024 12:54
Copy link
Collaborator

@rustagir rustagir left a comment

Choose a reason for hiding this comment

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

lgtm with a final suggestion

@@ -106,6 +106,10 @@ collection using the string "Gib" in the ``make`` field.
:language: csharp
:dedent:

.. note::

If the field you are searching has a search index, it must be included in your ``Autocomplete`` call. If a search index does not exist, the default index is used.
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
If the field you are searching has a search index, it must be included in your ``Autocomplete`` call. If a search index does not exist, the default index is used.
If the field you are searching on is indexed by a search index, you must pass the index name to the
``Autocomplete`` call. If a search index does not exist, the search uses the default index.

@rachel-mack rachel-mack merged commit 6484d1b into mongodb:master Mar 15, 2024
2 checks passed
@rachel-mack rachel-mack deleted the DOCSP-37267 branch March 19, 2024 20:54
rachel-mack added a commit to rachel-mack/docs-csharp that referenced this pull request Mar 19, 2024
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.

2 participants