Skip to content

Commit 7adec42

Browse files
committed
DOCSP-48252: autocomplete index link/note (#586)
* DOCSP-48252: autocomplete index link/note * SA small fix (cherry picked from commit 5eb8fc6)
1 parent d74a6f2 commit 7adec42

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Diff for: source/fundamentals/atlas-search.txt

+10-4
Original file line numberDiff line numberDiff line change
@@ -93,18 +93,24 @@ Autocomplete
9393
Use the ``Autocomplete()`` method to search for a word or phrase that contains a
9494
sequence of characters from an incomplete input string.
9595

96-
The following example performs an autocomplete search on the ``guitars``
97-
collection using the string "Gib" in the ``make`` field.
96+
The following example performs an autocomplete query on the ``make``
97+
field for text that starts with the string ``"Gib"``.
9898

9999
.. literalinclude:: /includes/fundamentals/code-examples/atlas-search/AtlasSearchExamples.cs
100100
:start-after: // start-autocomplete-search
101101
:end-before: // end-autocomplete-search
102102
:language: csharp
103103
:dedent:
104104

105-
.. note::
105+
.. note:: Index for Autocomplete Queries
106106

107-
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 default index is used.
107+
You must create an Atlas Search index that supports autocompletion
108+
to successfully perform autocomplete queries. To learn more, see
109+
:atlas:`How to Index Fields for Autocompletion </atlas-search/field-types/autocomplete-type/>`
110+
in the Atlas documentation.
111+
112+
After you create the Atlas Search index, you must pass the index name to
113+
the ``Autocomplete()`` method, as shown in the preceding code.
108114

109115
The search returns the following document:
110116

0 commit comments

Comments
 (0)