Reputation: 23
I have a collection of documents with a field called "idPattern" containing regex string. I want to search all documents that their fields "idPattern" regex string matches with my search string or a substring of it. How can I perform it?
Example:
Document:
{
"_id":....,
"_rev":....,
"idPattern":"*"
},
{
"_id":....,
"_rev":....,
"idPattern":"park"
},
{
"_id":....,
"_rev":....,
"idPattern":"stree*"
}
Search by: "park_central"
The first two documents should be returned.
Thank you.
Upvotes: 0
Views: 138