@@ -35,9 +35,9 @@ examples of how to use the {+odm-short+} to perform searches.
3535To learn more about Atlas Vector Search, see the :atlas:`Overview
3636</atlas-vector-search/vector-search-overview/>` in the
3737Atlas documentation. The Atlas Vector Search API internally uses the
38- ``$search `` aggregation operator to perform queries. To learn more about
39- this operator, see the :atlas:`$search
40- </atlas-search/aggregation-stages/ search/ >` reference in the Atlas
38+ ``$vectorSearch `` aggregation operator to perform queries. To learn more about
39+ this operator, see the :atlas:`$vectorSearch
40+ </atlas-vector- search/vector- search-stage/#syntax >` reference in the Atlas
4141documentation.
4242
4343.. note::
@@ -47,7 +47,7 @@ documentation.
4747 For more complex use cases, create an aggregation pipeline by using
4848 the :ref:`laravel-aggregation-builder`.
4949
50- To perform advanced text on your documents, you can use the
50+ To perform advanced full- text searches on your documents, you can use the
5151 {+odm-long+} Atlas Search API. To learn about this feature, see
5252 the :ref:`laravel-atlas-search` guide.
5353
@@ -73,24 +73,24 @@ You must pass the following parameters to the ``vectorSearch()`` method:
7373 :header-rows: 1
7474
7575 * - Parameter
76- - Type
77- - Description
76+ - Type
77+ - Description
7878
7979 * - ``index``
80- - ``string``
81- - Name of the vector search index
80+ - ``string``
81+ - Name of the vector search index
8282
8383 * - ``path``
84- - ``array`` or ``string``
85- - Field that stores vector embeddings
84+ - ``array`` or ``string``
85+ - Field that stores vector embeddings
8686
8787 * - ``queryVector``
88- - ``array``
89- - Vector representation of your query
88+ - ``array``
89+ - Vector representation of your query
9090
9191 * - ``limit``
92- - ``int``
93- - Number of results to return
92+ - ``int``
93+ - Number of results to return
9494
9595The following code uses the ``vector`` index created in the preceding
9696:ref:`laravel-avs-index` section to perform an Atlas Vector Search query on the
@@ -100,57 +100,57 @@ The following code uses the ``vector`` index created in the preceding
100100 :copyable: true
101101
102102 .. input::
103- :language: php
103+ :language: php
104104
105- $movies = Book::vectorSearch(
106- index: 'vector',
107- path: 'vector_embeddings',
108- // Vector representation of the query `coming of age`
109- queryVector: [-0.0016261312, -0.028070757, ...],
110- limit: 3,
111- );
105+ $movies = Book::vectorSearch(
106+ index: 'vector',
107+ path: 'vector_embeddings',
108+ // Vector representation of the query `coming of age`
109+ queryVector: [-0.0016261312, -0.028070757, ...],
110+ limit: 3,
111+ );
112112
113113 .. output::
114- :language: json
115- :visible: false
116-
117- [
118- { "title": "Sunrising",
119- "plot": "A shy teenager discovers confidence and new friendships during a transformative summer camp experience."
120- },
121- { "title": "Last Semester",
122- "plot": "High school friends navigate love, identity, and unexpected challenges before graduating together."
123- }
124- ]
125-
126- You can use the ``vector ()`` method to perform many types of Atlas
114+ :language: json
115+ :visible: false
116+
117+ [
118+ { "title": "Sunrising",
119+ "plot": "A shy teenager discovers confidence and new friendships during a transformative summer camp experience."
120+ },
121+ { "title": "Last Semester",
122+ "plot": "High school friends navigate love, identity, and unexpected challenges before graduating together."
123+ }
124+ ]
125+
126+ You can use the ``vectorSearch ()`` method to perform many types of Atlas
127127Search queries. Depending on your desired query, you can pass the
128- following optional parameters to ``search ()``:
128+ following optional parameters to ``vectorSearch ()``:
129129
130130.. list-table::
131131 :header-rows: 1
132132
133133 * - Optional Parameter
134- - Type
135- - Description
136- - Default Value
134+ - Type
135+ - Description
136+ - Default Value
137137
138138 * - ``exact``
139- - ``bool``
140- - Specifies whether to run an Exact Nearest Neighbor (``true``) or
141- Approximate Nearest Neighbor (``false``) search
142- - ``false``
139+ - ``bool``
140+ - Specifies whether to run an Exact Nearest Neighbor (``true``) or
141+ Approximate Nearest Neighbor (``false``) search
142+ - ``false``
143143
144144 * - ``filter``
145- - ``QueryInterface`` or ``array``
146- - Specifies a pre-filter for documents to search on
147- - no filtering
145+ - ``QueryInterface`` or ``array``
146+ - Specifies a pre-filter for documents to search on
147+ - no filtering
148148
149149 * - ``numCandidates``
150- - ``int`` or ``null``
151- - Specifies the number of nearest neighbors to use during the
152- search
153- - ``null``
150+ - ``int`` or ``null``
151+ - Specifies the number of nearest neighbors to use during the
152+ search
153+ - ``null``
154154
155155.. note::
156156
@@ -159,4 +159,4 @@ following optional parameters to ``search()``:
159159
160160To learn more about these parameters, see the :atlas:`Fields
161161</atlas-vector-search/vector-search-stage/#fields>` section of the
162- ``$vectorSearch`` operator reference in the Atlas documentation.
162+ ``$vectorSearch`` operator reference in the Atlas documentation.
0 commit comments