light modification
This commit is contained in:
parent
e5c7dbe4cb
commit
66196da877
@ -92,11 +92,10 @@ func (wfa *resourceMongoAccessor[T]) Search(filters *dbs.Filters, search string,
|
|||||||
func (abs *resourceMongoAccessor[T]) getResourceFilter(search string) *dbs.Filters {
|
func (abs *resourceMongoAccessor[T]) getResourceFilter(search string) *dbs.Filters {
|
||||||
return &dbs.Filters{
|
return &dbs.Filters{
|
||||||
Or: map[string][]dbs.Filter{ // filter by like name, short_description, description, owner, url if no filters are provided
|
Or: map[string][]dbs.Filter{ // filter by like name, short_description, description, owner, url if no filters are provided
|
||||||
"abstractresource.abstractobject.name": {{Operator: dbs.LIKE.String(), Value: search}},
|
"abstractintanciatedresource.abstractresource.abstractobject.name": {{Operator: dbs.LIKE.String(), Value: search}},
|
||||||
"abstractresource.short_description": {{Operator: dbs.LIKE.String(), Value: search}},
|
"abstractintanciatedresource.abstractresource.short_description": {{Operator: dbs.LIKE.String(), Value: search}},
|
||||||
"abstractresource.description": {{Operator: dbs.LIKE.String(), Value: search}},
|
"abstractintanciatedresource.abstractresource.description": {{Operator: dbs.LIKE.String(), Value: search}},
|
||||||
"abstractresource.owner": {{Operator: dbs.LIKE.String(), Value: search}},
|
"abstractintanciatedresource.abstractresource.owners": {{Operator: dbs.IN.String(), Value: search}},
|
||||||
"abstractresource.source_url": {{Operator: dbs.LIKE.String(), Value: search}},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user