From b5003e82b5fedb26ce846bd238df3db72df575ac Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Sat, 1 Jun 2013 14:34:07 -0400 Subject: [PATCH] Adding a regex to web find --- plugins/factoid.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/factoid.go b/plugins/factoid.go index 43a7abd..6c9b0f2 100644 --- a/plugins/factoid.go +++ b/plugins/factoid.go @@ -467,7 +467,7 @@ func (p *FactoidPlugin) serveQuery(w http.ResponseWriter, r *http.Request) { context := make(map[string]interface{}) if e := r.PostFormValue("entry"); e != "" { var entries []Factoid - p.Coll.Find(bson.M{"trigger": e}).All(&entries) + p.Coll.Find(bson.M{"trigger": bson.M{"$regex": e}}).All(&entries) context["Count"] = fmt.Sprintf("%d", len(entries)) context["Entries"] = entries context["Search"] = e