This class represents a Search Tag used in JSP. A
Search
can contain multiple
SearchPart
s that use
different
Application
s.
Attributes (defaults in brackets):
- format - one of
xml
or json
- parts (false) - whether the resulting XML/JSON should be split in parts
- highlight (span) - the x(ht)ml-tag used to highlight the search term within the search results.
Parameters: The following parameters (<appNG:param>) are supported (defaults in brackets):
- pageSize (25)
the page size to use
- pageSizeParam (25)
the name of the request parameter that contains the page-size
- pageParam ("page")
the name of the request parameter that contains the current page
- queryParam ("q")
the name of the request parameter that contains the search term
- maxTextLength (150)
the maximum length of a search result text
- dateFormat ("yyyy-MM-dd")
the date pattern used to format dates
- fillWith (...)
the placeholder used when the search result text is being stripped
- xsl ()
the path to the XSLT stylesheet to use when format is XML
- pretty (false)
if the XML/JSON output should be formatted prettily
Usage:
<appNG:search parts="false" format="json" highlight="span">
<appNG:param name="queryParam">term</appNG:param>
<appNG:searchPart application="global" language="de" title="Search Results" fields="title,contents" analyzerClass="org.apache.lucene.analysis.de.GermanAnalyzer"/>
</appNG:search>