Faceted Search Query Xml - SearchBase Query Element Example (Native)

The Faceted Search Query Builder macro (se:facetedsearchquerybuilder) contains a lot of local instance vipers. Usually, local instance vipers are used within the macro itself, e.g. formatting, but in this case the local instance vipers should only be used within a query xml definition.

This example shows a searchbase query element from a query xml definition in which some of the available local instance vipers are used. The example here uses native queries (LIKE statements instead of CONTAINSTABLE, which is used within fulltext indexing scenarios).

Smartsite SXML CopyCode image Copy Code
<query><![CDATA[
    SELECT c.Nr, ({this.rankingstatement("content")})*100 as SearchRank, 1 AS BaseSearch
    FROM {this.searchgroupviewname()} c WITH (NOEXPAND)
    WHERE {this.searchcondition("content")}
    ]]>
</query>