Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagegroovy
linenumberstrue
router.GET('topics/cat1cat2') {
 strategy(DOCUMENTS_BY_FORMULA) {
   selectQuery("'SELECT Form=\"MainTopic\" & @Contains(Categories;\"category1\":\"category2\")"')
 }
 mapJson 'id', json:'id', type:'STRING', isformula:true, formula:'@DocumentUniqueID'
 mapJson 'date_created', json:'date_created', type:'DATETIME', isformula:true, formula:'@Created'
 mapJson 'topic', json:'topic', type:'STRING'
 mapJson 'author', json:'author', type:'STRING', isformula:true, formula:'@Name([CN]; @Author)'
 mapJson 'categories', json:'categories', type:'ARRAY_OF_STRING'
} 

...