shakes:create-query($queryStr as xs:string?, $mode as xs:string?) as item()*
Helper function: create a lucene query from the user input
$queryStr? | $queryStr? |
$mode? | $mode? |
shakes:do-query($queryStr as xs:string?, $mode as xs:string?) as item()*
$queryStr? | $queryStr? |
$mode? | $mode? |
shakes:from-session($node as node()*, $model as map(*)) as item()*
Read the last query result from the HTTP session and pass it to nested templates in the $model parameter.
$node* | $node* |
$model | $model |
shakes:hit-count($node as node()*, $model as map(*)) as item()*
Create a span with the number of items in the current search result. The annotation %templates:output("wrap") tells the templating module to create a new element with the same name and attributes as $node, using the return value of the function as its content.
$node* | $node* |
$model | $model |
shakes:query($node as node()*, $model as map(*), $query as xs:string?, $mode as xs:string?) as item()*
Execute a query and pass the result to nested template functions. This function returns
a map, not a node. The templating module recognizes this and will merge the map into
the current model, then continue processing any children of $node.
The annotation %templates:wrap indicates that the current element (in $node) should be preserved.
The templating module copies the current element and its attributes, before processing
its children.
$node* | $node* |
$model | $model |
$query? | $query? |
$mode? | $mode? |
shakes:show-hits($node as node()*, $model as map(*), $start as xs:int) as item()*
Output the actual search result as a div, using the kwic module to summarize full text matches.
$node* | $node* |
$model | $model |
$start | $start |