Feature: W.I.P. search route

This commit is contained in:
Paul
2021-07-09 14:34:01 +01:00
parent fe821b8283
commit 6f8802ab5f
6 changed files with 165 additions and 3 deletions

View File

@@ -122,6 +122,23 @@ pub async fn create_database() {
.await
.expect("Failed to create username index.");
db.run_command(
doc! {
"createIndexes": "messages",
"indexes": [
{
"key": {
"content": "text"
},
"name": "content"
}
]
},
None,
)
.await
.expect("Failed to create message index.");
db.collection("migrations")
.insert_one(
doc! {