models2: Fixed text search not working.
the build was successful

This commit is contained in:
2018-10-13 14:04:02 +02:00
parent 90681c67b0
commit d3277c7476
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ func makeLogID(date time.Time, channel string) string {
func init() {
store.HandleInit(func(db *mgo.Database) {
collection = db.C("logbot3.logs")
postCollection = db.C("logbo3.posts")
postCollection = db.C("logbot3.posts")
collection.EnsureIndexKey("date")
collection.EnsureIndexKey("channel")
+1 -1
View File
@@ -64,7 +64,7 @@ func search(text string) ([]string, error) {
}
ids := make([]string, 0, 64)
err := postCollection.Find(query).Distinct("logId", ids)
err := postCollection.Find(query).Distinct("logId", &ids)
return ids, err
}