test on nested search
This commit is contained in:
		@@ -253,7 +253,10 @@ func (m *MongoDB) Search(search string, filter []string, collection_name string)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	if cursor, err := targetDBCollection.Find(
 | 
						if cursor, err := targetDBCollection.Find(
 | 
				
			||||||
		MngoCtx,
 | 
							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,
 | 
							opts,
 | 
				
			||||||
	); err != nil {
 | 
						); err != nil {
 | 
				
			||||||
		fmt.Println(0, bson.M{"$or": list})
 | 
							fmt.Println(0, bson.M{"$or": list})
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user