When the db library is /dbLib/ { set db [__db] Wish the web server handles route "/statements" with handler { set l [list] # You need to use the Simple form so it doesn't auto-claimize it. set results [QuerySimple! false /...terms/] foreach result $results { dict with result { set childMatchRefs [$dbLib childMatches $db $__ref] set childMatchInfo [join [lmap childMatchRef $childMatchRefs { set childStatementRefs [$dbLib childStatements $db $childMatchRef] subst { \[ $childMatchRef ($childStatementRefs) \] } }] " "] lappend l [subst {
[htmlEscape [string range $terms 0 100]] ($childMatchInfo)[htmlEscape $terms]