search is debug nested object included
This commit is contained in:
@@ -253,17 +253,11 @@ func (m *MongoDB) Search(search string, filter []string, collection_name string)
|
||||
|
||||
if cursor, err := targetDBCollection.Find(
|
||||
MngoCtx,
|
||||
bson.M{"$or": []bson.M{
|
||||
{"abstractresource.abstractobject.name": bson.M{"$regex": search, "$options": "i"}},
|
||||
{"abstractresource.description": bson.M{"$regex": search, "$options": "i"}},
|
||||
}},
|
||||
bson.M{"$or": list},
|
||||
opts,
|
||||
); err != nil {
|
||||
fmt.Println(0, bson.M{"$or": list})
|
||||
return nil, 404, err
|
||||
} else {
|
||||
fmt.Println(cursor, bson.M{"$or": list})
|
||||
|
||||
return cursor, 200, nil
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user