diff --git a/dbs/mongo/mongo.go b/dbs/mongo/mongo.go index 5a1f2e5..ce37b7e 100644 --- a/dbs/mongo/mongo.go +++ b/dbs/mongo/mongo.go @@ -253,7 +253,10 @@ func (m *MongoDB) Search(search string, filter []string, collection_name string) if cursor, err := targetDBCollection.Find( MngoCtx, - bson.M{"name": bson.M{"$regex": search, "$options": "i"}}, + bson.M{"$or": []bson.M{ + {"abstractresource.abstractobject.name": bson.M{"$regex": search, "$options": "i"}}, + {"abstractresource.description": bson.M{"$regex": search, "$options": "i"}}, + }}, opts, ); err != nil { fmt.Println(0, bson.M{"$or": list})