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
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions source/fundamentals/atlas-search.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ collection using the string "Gib" in the ``make`` field.
:language: csharp
:dedent:

.. note::
rustagir marked this conversation as resolved.
Show resolved Hide resolved
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.


The search returns the following document:

.. code-block:: json
Expand Down
Loading