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
We can use the [`Indexes`]({{< relref "builders/indexes.md">}}) helpers to create index keys:
95
95
96
96
```scala
97
97
collection.createIndex(ascending("i")).printResults("Created an index named: ")
@@ -116,7 +116,8 @@ The example should print the following indexes:
116
116
117
117
MongoDB also provides text indexes to support text search of string
118
118
content. Text indexes can include any field whose value is a string or
119
-
an array of string elements.
119
+
an array of string elements. To create a text index use the [`Indexes.text`]({{< relref "builders/indexes.md#text-index">}})
120
+
static helper:
120
121
121
122
The following example creates a text index by specifying the string literal "text" in the index document, then insert some sample documents.
122
123
Using a for comprehension we can combine the two operations:
@@ -135,14 +136,14 @@ indexAndInsert.results()
135
136
```
136
137
137
138
As of MongoDB 2.6, text indexes are now integrated into the main query
138
-
language and enabled by default (here we use the [`Filters.text`]({{< coreapiref "com/mongodb/client/model/Filters.html#text-java.lang.String-">}}) helper):
139
+
language and enabled by default (here we use the [`Filters.text`]({{< relref "builders/filters.md#evaluation">}}) helper):
0 commit comments