@@ -134,7 +134,8 @@ Autocomplete Queries
134134The {+odm-short+} provides the ``autocomplete()`` method as a query
135135builder method and as an Eloquent model method. You can use the
136136``autocomplete()`` method to run autocomplete searches on documents in your
137- collections.
137+ collections. This method returns only the values of the field you
138+ specify as the query path.
138139
139140To learn more about this type of Atlas Search query, see the
140141:atlas:`autocomplete </atlas-search/autocomplete/>` reference in the
@@ -147,8 +148,8 @@ Atlas documentation.
147148 :ref:`laravel-as-index` section of this guide to learn more about
148149 creating Search indexes.
149150
150- The following code performs an Atlas Search autocomplete query on the
151- ``movies `` collection :
151+ The following code performs an Atlas Search autocomplete query for the
152+ string ``"jak" `` on the ``title`` field :
152153
153154.. io-code-block::
154155 :copyable: true
@@ -166,7 +167,7 @@ The following code performs an Atlas Search autocomplete query on the
166167 [
167168 "Dreaming of Jakarta",
168169 "Jakob the Liar",
169- "title": " Emily Calling Jake"
170+ "Emily Calling Jake"
170171 ]
171172
172173You can also pass the following parameters to the ``autocomplete()``
@@ -248,7 +249,7 @@ Search queries. Depending on your desired query, you can pass the
248249following optional parameters to ``search()``:
249250
250251- ``exact``: ``bool`` (default: ``false``)
251- - ``filter``: ``QueryInterface`` or ``array``
252+ - ``filter``: ``QueryInterface`` or ``array`` (default: no filtering)
252253- ``numCandidates``: ``int`` or ``null`` (default: ``null``)
253254
254255.. tip::
0 commit comments