Skip to content

Commit bca7b7b

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 8fb721d commit bca7b7b

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

source/fundamentals/atlas-search.txt

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

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

9494
.. literalinclude:: /includes/fundamentals/code-examples/atlas-search/AtlasSearchExamples.cs
9595
:start-after: // start-autocomplete-search
9696
:end-before: // end-autocomplete-search
9797
:language: csharp
9898
:dedent:
9999

100-
.. note::
100+
.. note:: Index for Autocomplete Queries
101101

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

104110
The search returns the following document:
105111

0 commit comments

Comments
 (0)