@@ -27,9 +27,9 @@ perform Atlas Vector Search queries by using the :ref:`Aggregation Builder API
2727
2828.. note:: Deployment Compatibility
2929
30- You can use the Atlas Search feature only when
31- you connect to MongoDB Atlas clusters. This feature is not
32- available for self-managed deployments.
30+ You can use the Atlas Search feature only when
31+ you connect to MongoDB Atlas clusters. This feature is not
32+ available for self-managed deployments.
3333
3434To learn more about Atlas Vector Search, see the :atlas:`Overview
3535</atlas-vector-search/vector-search-overview/>` in the
@@ -82,11 +82,11 @@ queries:
8282.. code-block:: php
8383
8484 $pipeline = new Pipeline(
85- Stage::vectorSearch(
86- /* Atlas Vector Search query specifications
87- index: '<index name>',
88- path: '<path to embeddings>', ...*/
89- ),
85+ Stage::vectorSearch(
86+ /* Atlas Vector Search query specifications
87+ index: '<index name>',
88+ path: '<path to embeddings>', ...*/
89+ ),
9090 );
9191
9292You must pass the following parameters to the ``vectorSearch()`` method:
@@ -95,24 +95,24 @@ You must pass the following parameters to the ``vectorSearch()`` method:
9595 :header-rows: 1
9696
9797 * - Parameter
98- - Type
99- - Description
98+ - Type
99+ - Description
100100
101101 * - ``index``
102- - ``string``
103- - Name of the vector search index
102+ - ``string``
103+ - Name of the vector search index
104104
105105 * - ``path``
106- - ``array`` or ``string``
107- - Field that stores vector embeddings
106+ - ``array`` or ``string``
107+ - Field that stores vector embeddings
108108
109109 * - ``queryVector``
110- - ``array``
111- - Vector representation of your query
110+ - ``array``
111+ - Vector representation of your query
112112
113113 * - ``limit``
114- - ``int``
115- - Number of results to return
114+ - ``int``
115+ - Number of results to return
116116
117117Atlas Search Query Examples
118118---------------------------
@@ -123,7 +123,7 @@ section use sample data from the ``sample_mflix.embedded_movies``
123123collection.
124124
125125.. note:: Query Vector Length
126-
126+
127127 For demonstrative purposes, the examples in this section use
128128 sample query vectors that contain very few elements, compared to
129129 the query vector you might use in a runnable application. To view an
@@ -142,19 +142,19 @@ The following code performs an Atlas Vector Search query on the
142142 :copyable: true
143143
144144 .. input:: /includes/aggregation/vector-search.php
145- :language: php
146- :dedent:
147- :start-after: start-basic-query
148- :end-before: end-basic-query
145+ :language: php
146+ :dedent:
147+ :start-after: start-basic-query
148+ :end-before: end-basic-query
149149
150150 .. output::
151- :language: json
152- :visible: false
151+ :language: json
152+ :visible: false
153153
154- {"title":"Thrill Seekers"}
155- {"title":"About Time"}
156- {"title":"Timecop"}
157- // Results truncated
154+ {"title":"Thrill Seekers"}
155+ {"title":"About Time"}
156+ {"title":"Timecop"}
157+ // Results truncated
158158
159159Vector Search Score
160160~~~~~~~~~~~~~~~~~~~
@@ -167,19 +167,19 @@ field, which describes how well the document matches the query vector:
167167 :copyable: true
168168
169169 .. input:: /includes/aggregation/vector-search.php
170- :language: php
171- :dedent:
172- :start-after: start-score-query
173- :end-before: end-score-query
170+ :language: php
171+ :dedent:
172+ :start-after: start-score-query
173+ :end-before: end-score-query
174174
175175 .. output::
176- :language: json
177- :visible: false
176+ :language: json
177+ :visible: false
178178
179- {"title":"Thrill Seekers","score":0.927734375}
180- {"title":"About Time","score":0.925750732421875}
181- {"title":"Timecop","score":0.9241180419921875}
182- // Results truncated
179+ {"title":"Thrill Seekers","score":0.927734375}
180+ {"title":"About Time","score":0.925750732421875}
181+ {"title":"Timecop","score":0.9241180419921875}
182+ // Results truncated
183183
184184Vector Search Options
185185~~~~~~~~~~~~~~~~~~~~~
@@ -192,26 +192,26 @@ following optional parameters to ``vectorSearch()``:
192192 :header-rows: 1
193193
194194 * - Optional Parameter
195- - Type
196- - Description
197- - Default Value
195+ - Type
196+ - Description
197+ - Default Value
198198
199199 * - ``exact``
200- - ``bool``
201- - Specifies whether to run an Exact Nearest Neighbor (``true``) or
202- Approximate Nearest Neighbor (``false``) search
203- - ``false``
200+ - ``bool``
201+ - Specifies whether to run an Exact Nearest Neighbor (``true``) or
202+ Approximate Nearest Neighbor (``false``) search
203+ - ``false``
204204
205205 * - ``filter``
206- - ``QueryInterface`` or ``array``
207- - Specifies a pre-filter for documents to search on
208- - no filtering
206+ - ``QueryInterface`` or ``array``
207+ - Specifies a pre-filter for documents to search on
208+ - no filtering
209209
210210 * - ``numCandidates``
211- - ``int`` or ``null``
212- - Specifies the number of nearest neighbors to use during the
213- search
214- - ``null``
211+ - ``int`` or ``null``
212+ - Specifies the number of nearest neighbors to use during the
213+ search
214+ - ``null``
215215
216216To learn more about these parameters, see the :atlas:`Fields
217217</atlas-vector-search/vector-search-stage/#fields>` section of the
0 commit comments