Skip to content

Commit 0f2e622

Browse files
DOCSP-22631 Add 2dsphere example to Time Series Secondary Index (#7281)
* DOCSP-22631 Add 2dsphere example to Time Series Secondary Index * DOCSP-22631 updates for NA's feedback
1 parent 374d3b6 commit 0f2e622

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

source/core/timeseries/timeseries-secondary-index.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,20 @@ Starting in MongoDB 6.0, you can:
306306

307307
- Use the ``metaField`` with :ref:`2dsphere <2dsphere-index>` indexes.
308308

309+
.. example::
310+
311+
.. code-block:: javascript
312+
313+
db.sensorData.createIndex({ "metadata.location": "2dsphere" })
314+
315+
- Create ``2dsphere`` indexes on measurements.
316+
317+
.. example::
318+
319+
.. code-block:: javascript
320+
321+
db.sensorData.createIndex({ "currentConditions.tempF": "2dsphere" })
322+
309323
.. note::
310324

311325
.. include:: /includes/time-series-secondary-indexes-downgrade-FCV.rst

0 commit comments

Comments
 (0)