File tree Expand file tree Collapse file tree 3 files changed +3
-7
lines changed Expand file tree Collapse file tree 3 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ Atlas Search Metadata
94
94
95
95
Use the ``searchMeta()`` method to create a :manual:`$searchMeta
96
96
</reference/operator/aggregation/searchMeta/>` pipeline stage, which returns
97
- only the metadata from of the Atlas full-text search results.
97
+ only the metadata from the Atlas full-text search results.
98
98
99
99
.. tip:: Only Available on Atlas for MongoDB v4.4.11 and later
100
100
Original file line number Diff line number Diff line change @@ -9,8 +9,6 @@ import com.mongodb.client.model.search.SearchPath.fieldPath
9
9
import com.mongodb.kotlin.client.MongoCollection
10
10
import org.bson.Document
11
11
12
- private const val CONNECTION_URI = " <connection URI>"
13
-
14
12
fun runAtlasTextSearchMeta (collection : MongoCollection <Document >) {
15
13
val textSearchMeta =
16
14
// begin atlasSearchMeta
@@ -28,7 +26,7 @@ fun runAtlasTextSearchMeta(collection: MongoCollection<Document>) {
28
26
}
29
27
30
28
fun main () {
31
- val uri = CONNECTION_URI
29
+ val uri = " <connection string> "
32
30
33
31
val settings = MongoClientSettings .builder()
34
32
.applyConnectionString(ConnectionString (uri))
@@ -39,7 +37,6 @@ fun main() {
39
37
val database = mongoClient.getDatabase(" sample_mflix" )
40
38
val collection = database.getCollection<Document >(" movies" )
41
39
42
- // Uncomment the methods that correspond to what you're testing
43
- // runAtlasTextSearchMeta(collection)
40
+ runAtlasTextSearchMeta(collection)
44
41
}
45
42
}
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ fun main() {
25
25
val database = mongoClient.getDatabase(" sample_mflix" )
26
26
val collection = database.getCollection<Document >(" movies" )
27
27
28
- // Queries for documents that have a "title" value containing the word "Alabama"
29
28
// begin-atlas-search
30
29
val pipeline: List <Bson > = listOf (
31
30
search(SearchOperator .text(
You can’t perform that action at this time.
0 commit comments