You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/autocomplete.txt
+79-1Lines changed: 79 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,88 @@ Autocomplete
6
6
7
7
.. default-domain:: mongodb
8
8
9
+
.. meta::
10
+
:description: Use the MongoDB for IntelliJ Plugin to autocomplete database, collection, and document field names.
11
+
9
12
.. contents:: On this page
10
13
:local:
11
14
:backlinks: none
12
15
:depth: 1
13
16
:class: singlecol
14
17
15
-
Content on this page will be addressed in DOCSP-44964.
18
+
The {+intellij-full+} provides autocomplete suggestions for database,
19
+
collection, or field names based on the connected data source. For example,
20
+
when you type a field name in a query, the plugin analyzes the MongoDB
21
+
collection and document schema to automatically suggest valid field names.
22
+
23
+
To use the autocomplete feature, start typing in a document field, collection,
24
+
or database name. Then press :kbd:`Ctrl` + :kbd:`Space` to display a drop-down
25
+
list that shows the available suggestions.
26
+
27
+
Database Name Autocompletion
28
+
----------------------------
29
+
30
+
To autocomplete database names, press :kbd:`Ctrl` + :kbd:`Space`
31
+
inside the `getDatabase() <https://mongodb.github.io/mongo-java-driver/5.2/apidocs/mongodb-driver-sync/com/mongodb/client/MongoClient.html#getDatabase(java.lang.String)>`__
32
+
method of a ``MongoClient`` instance.
33
+
34
+
The {+intellij-short+} displays a drop-down list of available database names,
35
+
denoted by the ``MongoDB Database`` text and the database icon, as shown in
36
+
the image below:
37
+
38
+
.. image:: /images/database-autocomplete.png
39
+
:alt: Autocomplete database names in the IntelliJ Plugin.
40
+
41
+
Collection Name Autocompletion
42
+
------------------------------
43
+
44
+
To autocomplete collection names, press :kbd:`Ctrl` + :kbd:`Space`
45
+
inside the `getCollection() <https://mongodb.github.io/mongo-java-driver/5.2/apidocs/mongodb-driver-sync/com/mongodb/client/MongoDatabase.html#getCollection(java.lang.String)>`__
46
+
method of a ``MongoClient`` instance.
47
+
48
+
The {+intellij-short+} displays a drop-down list of available collection names,
49
+
denoted by the ``MongoDB Collection`` text and the collection icon, as shown in
50
+
the image below:
51
+
52
+
.. image:: /images/collection-autocomplete.png
53
+
:alt: Autocomplete collections names in the IntelliJ Plugin.
54
+
55
+
.. important::
56
+
57
+
Collection name autocompletion currently requires a complete query to
58
+
suggest collection names. For example, you must write a query that specifies
59
+
the database name and a document field for the {+intellij-short+} to suggest
60
+
valid collection names.
61
+
62
+
Document Field Name Autocompletion
63
+
----------------------------------
64
+
65
+
To autocomplete document field names, press :kbd:`Ctrl` + :kbd:`Space`
66
+
inside one of the following `MongoCollection <https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-sync/com/mongodb/client/MongoCollection.html>`__
67
+
methods:
68
+
69
+
- ``countDocuments``
70
+
- ``deleteMany``
71
+
- ``deleteOne``
72
+
- ``distinct``
73
+
- ``find``
74
+
- ``findOneAndDelete``
75
+
- ``findOneAndReplace``
76
+
- ``findOneAndUpdate``
77
+
- ``replaceOne``
78
+
- ``updateMany``
79
+
- ``updateOne``
80
+
81
+
The {+intellij-short+} displays a drop-down list of available field names,
82
+
denoted by their data type and the document icon. For example, the image
83
+
below shows autocomplete suggestions for fields that start with ``rat`` in the
84
+
``sample_mflix.movies`` collection:
85
+
86
+
.. image:: /images/document-autocomplete.png
87
+
:alt: Autocomplete document field names in the IntelliJ Plugin.
0 commit comments