@ -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")
@ -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