{_id : 1, tags : ["mongodb", "nosql", "index"]}
{_id : 2 , tages : ["database", "index"]}
db.users.createindex({tags : 1})
"database" -> _id : 2
"index" : -> _id : 1, _id : 2
"mongodb" -> _id : 1
"nosql" -> _id : 1
--------
db.users.createIndex({"creatdAt"}, {expireAfterSeconds : 3600})
---------
db.users.createindex({title : "text", content : "text"})
-> db.users.find({$text : {$search : "mongodb index"})
'Database > NoSQL' 카테고리의 다른 글
[MongoDB] CRUD와 Upsert (0) | 2025.06.16 |
---|---|
[MongoDB] 인덱스 설계 법칙과 쿼리 튜닝을 위한 실행 계획 분석 (0) | 2025.06.16 |
[MongoDB] index (0) | 2025.06.16 |
[MongoDB] 스키마 설계 패턴 (0) | 2025.06.16 |
[MongoDB] 문서 설계와 사례 (0) | 2025.06.16 |