Skip to content

Commit c0d8842

Browse files
committed
DOCSP-43494 adding second docs example
1 parent 9c534af commit c0d8842

File tree

2 files changed

+5
-29
lines changed

2 files changed

+5
-29
lines changed

source/copilot-docs.txt

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -33,42 +33,18 @@ index in the GitHub Copilot chat:
3333
.. code-block:: none
3434
:copyable: false
3535

36-
@MongoDB /docs how do I create an index?
36+
@MongoDB /docs How do I create an index?
3737

3838
The chat first provides the following MongoDB documentation:
3939

4040
- `Create an Index <https://www.mongodb.com/docs/manual/core/indexes/create-index/>`__
4141
- `createIndexes <https://mongodb.com/docs/manual/reference/command/createIndexes/>`__
42-
- `Getting Started with MongoDB and Java - CRUD Operations Tutorial <https://www.mongodb.com/developer/languages/java/java-setup-crud-operations>`__
4342
- `db.collection.createIndex() <https://mongodb.com/docs/manual/reference/method/db.collection.createIndex/>`__
44-
45-
The |copilot| also returns a text response with information about
46-
creating an index:
47-
48-
.. code-block:: none
49-
:copyable: false
50-
51-
To create an index in MongoDB, you can use the createIndex() method
52-
in the MongoDB Shell or the equivalent method for your specific
53-
driver. Here are examples for different programming languages:
43+
- `Partial Indexes <https://www.mongodb.com/docs/manual/core/index-partial/>`_
44+
- `db.collection.createIndexes() <https://www.mongodb.com/docs/manual/reference/method/db.collection.createIndexes/>`_
5445

55-
MongoDB Shell
56-
57-
db.collection.createIndex({ <key and index type specification> }, { <options> })
58-
59-
C#
60-
61-
collection.CreateIndex(IndexKeys<collection>.<key and index type
62-
specification>, <options>);
63-
64-
...
65-
66-
Indexes support efficient execution of queries in MongoDB. If your
67-
application is repeatedly running queries on the same fields,
68-
creating an index on those fields can significantly improve
69-
performance. However, keep in mind that while indexes improve query
70-
performance, they can negatively impact write operations due to the
71-
additional overhead of maintaining the index.
46+
The |copilot| also returns a text response with information about
47+
creating an index and code examples:
7248

7349
.. figure:: /images/copilot-docs.png
7450
:figwidth: 700px

source/images/copilot-docs.png

-171 KB
Loading

0 commit comments

Comments
 (0)