API - Search for items containing text

Yes, there is such a thing, the $regex filter.

POST:
api/collections/get/articles
Body:

{     
  "limit": 10,     
  "filter": {   
    "content": {      
      "$regex" : "(phone|tablet)" // a valid PHP regular expression without slashes
    }
  },     
  "sort": { 
    "_created" : -1
  } 
}

rel Search itens by term - #4 by artur

3 Likes