NOTE! As of SiteVision 3, this Search portlet replaces the "old" Search portlet that wasn't using the SiteVision Public API.
The custom Velocity template in this portlet uses the JCR (Java Content Repository, JSR 283) programming model. The SiteVision API is available here
Name | Type and Description |
---|---|
request | javax.portlet.PortletRequest |
The portlet request | |
portlet | javax.jcr.Node |
This portlet. See available properties in table below | |
jcrSession | javax.jcr.Session |
The JCR Session | |
sitevisionUtils | senselogic.sitevision.api.Utils |
The main entry point to all utility classes | |
velocityEvaluator | senselogic.sitevision.api.render.velocity.VelocityEvaluator |
A evaluator that can parse Velocity templates or Velocity expressions on the fly | |
searchResult | senselogic.sitevision.api.search.SearchResult |
The search result that holds all hits |
Name | Type and Description | |
---|---|---|
Search form | ||
searchFieldSize | javax.jcr.PropertyType.LONG | |
The size of the search form input field | ||
searchFieldFont | javax.jcr.PropertyType.WEAKREFERENCE | |
The search field font Node (sv:font) | ||
useTextSearchButton | javax.jcr.PropertyType.BOOLEAN | |
Whether to use a text button or not (i.e. an image button) | ||
searchButtonText | javax.jcr.PropertyType.STRING | |
The i18n:ized search button text (en: "Search") | ||
searchButtonFont | javax.jcr.PropertyType.WEAKREFERENCE | |
The search button Node (sv:font) | ||
searchButtonImage | javax.jcr.PropertyType.WEAKREFERENCE | |
The search button image Node (sv:image) | ||
Auto complete suggestions | ||
useAutoSuggestions | javax.jcr.PropertyType.BOOLEAN | |
Whether or not to use auto complete suggestions | ||
maxAutoSuggestions | javax.jcr.PropertyType.LONG | |
Max number of autocomplete suggestions | ||
autoCompleteURL | javax.jcr.PropertyType.STRING | |
The autocomplete suggestion URL to use in Ajax calls | ||
autocompleteField | javax.jcr.PropertyType.STRING | |
What index field to use when extracting auto complete suggestions ("nameField" or "titleField", se Index fields section below) | ||
Querying | ||
queryParameter | javax.jcr.PropertyType.STRING | |
The name of the parameter to use when submitting a query | ||
searchFormTargetPage | javax.jcr.PropertyType.WEAKREFERENCE | |
The Node (typically a sv:page) rendering all templates for a search result | ||
ajaxQueryBaseURL | javax.jcr.PropertyType.STRING | |
Base URL to use for Ajax querying calls | ||
isRenderingAjaxResult | javax.jcr.PropertyType.BOOLEAN | |
Whether or not the search result was retrieved via Ajax | ||
updateResultFunctionName | javax.jcr.PropertyType.STRING | |
A unique name for the JavaScript update function | ||
Type restrictions | ||
includeFiles | javax.jcr.PropertyType.BOOLEAN | |
Whether or not to include files in the search result | ||
includeImages | javax.jcr.PropertyType.BOOLEAN | |
Whether or not to include images in the search result | ||
includePages | javax.jcr.PropertyType.BOOLEAN | |
Whether or not to include pages in the search result | ||
includeArticles | javax.jcr.PropertyType.BOOLEAN | |
Whether or not to include articles in the search result | ||
includeStructurePages | javax.jcr.PropertyType.BOOLEAN | |
Whether or not to include structure pages in the search result | ||
Search failed | ||
showSearchError | javax.jcr.PropertyType.BOOLEAN | |
Whether or not to show search errors or no hits messages | ||
errorMessage | javax.jcr.PropertyType.STRING | |
An i18n:ized message describing why search could not be executed | ||
searchErrorFont | javax.jcr.PropertyType.WEAKREFERENCE | |
The search error font Node (sv:font) | ||
Search result | ||
showNumberOfHits | javax.jcr.PropertyType.BOOLEAN | |
Whether or not to show number of hits | ||
numberOfHitsFont | javax.jcr.PropertyType.WEAKREFERENCE | |
The number of hits font Node (sv:font) | ||
countThreshold | javax.jcr.PropertyType.LONG | |
Effective hit count threshold (exact count vs. approximate count) | ||
useDidYouMean | javax.jcr.PropertyType.BOOLEAN | |
Whether or not to use and show "Did you mean" | ||
didYouMeanFont | javax.jcr.PropertyType.WEAKREFERENCE | |
The "Did you mean" font Node (sv:font) | ||
Paging | ||
usePaging | javax.jcr.PropertyType.BOOLEAN | |
Whether or not to use paging | ||
hitsPerPage | javax.jcr.PropertyType.LONG | |
Maximum number of hits to display for each paged frame | ||
pagingFont | javax.jcr.PropertyType.WEAKREFERENCE | |
The paging font Node (sv:font) | ||
pagingPosition | javax.jcr.PropertyType.STRING | |
Where the paging navigation should be located ("top", "bottom" or "top_bottom") | ||
ajaxPagingBaseURL | javax.jcr.PropertyType.STRING | |
The base URL to use for Ajax paging calls | ||
isRenderingAjaxPagingResult | javax.jcr.PropertyType.BOOLEAN | |
Whether or not the paged search result is retrieved via Ajax | ||
startAtHit | javax.jcr.PropertyType.LONG | |
First hit number for the paged search result | ||
previousFrameURI | javax.jcr.PropertyType.STRING | |
The relative URL for previous paged frame | ||
nextFrameURI | javax.jcr.PropertyType.STRING | |
The relative URL for next paged frame | ||
Highlighting | ||
useSearchHitHighlighting | javax.jcr.PropertyType.BOOLEAN | |
Whether or not to use search hit highlighting | ||
searchHitHighlightingType | javax.jcr.PropertyType.STRING | |
Type of highlighting ("strong" or "em") | ||
searchHitHighlightingFragsize | javax.jcr.PropertyType.LONG | |
Size (approximated char count) for highlighted fragments | ||
Index fields | ||
summaryField | javax.jcr.PropertyType.STRING | |
Name of the summary field | ||
titleField | javax.jcr.PropertyType.STRING | |
Name of the title field | ||
nameField | javax.jcr.PropertyType.STRING | |
Name of the name field | ||
namepathField | javax.jcr.PropertyType.STRING | |
Name of the name path field | ||
urlField | javax.jcr.PropertyType.STRING | |
Name of the absolute URL field | ||
uriField | javax.jcr.PropertyType.STRING | |
Name of the relative URL field | ||
lastPublishedField | javax.jcr.PropertyType.STRING | |
Name of the last published field | ||
sizeField | javax.jcr.PropertyType.STRING | |
Name of the size field | ||
siteField | javax.jcr.PropertyType.STRING | |
Name of the site field | ||
mimetypeField | javax.jcr.PropertyType.STRING | |
Name of the mime type field | ||
Search hits | ||
showSearchHitNumbering | javax.jcr.PropertyType.BOOLEAN | |
Whether or not search hits should be displayed numbered | ||
showFileIcons | javax.jcr.PropertyType.BOOLEAN | |
Whether or not a file icons should be displayed for each search hit | ||
useSearchHitBackgroundColor | javax.jcr.PropertyType.BOOLEAN | |
Whether or not a searchHitBackgroundColor (see line below) are in use | ||
searchHitBackgroundColor | javax.jcr.PropertyType.WEAKREFERENCE | |
The background color for every odd search hit (sv:color) | ||
headingField | javax.jcr.PropertyType.STRING | |
What field to fetch the heading text from ("nameField" or "titleField", see Index fields section above) | ||
searchHitHeadingFont | javax.jcr.PropertyType.WEAKREFERENCE | |
The hit heading font Node (sv:font) | ||
showSearchHitExcerpt | javax.jcr.PropertyType.BOOLEAN | |
Whether or not to show hit excerpts | ||
searchHitExcerptFont | javax.jcr.PropertyType.WEAKREFERENCE | |
The hit excerpt font Node (sv:font) | ||
searchHitExcerptLength | javax.jcr.PropertyType.LONG | |
Approximate length (char count) for search hit excerpts | ||
showSearchHitInfo | javax.jcr.PropertyType.BOOLEAN | |
Whether or not to show hit info (date + size) | ||
searchHitInfoFont | javax.jcr.PropertyType.WEAKREFERENCE | |
The hit info font Node (sv:font) | ||
showSearchHitPath | javax.jcr.PropertyType.BOOLEAN | |
Whether or not to show a linked path to the search hit | ||
searchHitPathFont | javax.jcr.PropertyType.WEAKREFERENCE | |
The hit path font Node (sv:font) | ||
Misc | ||
useCustomSortFields | javax.jcr.PropertyType.BOOLEAN | |
Whether or not to use custom sort fields (i.e. use a custom "relevance" sorting") | ||
useCustomIndex | javax.jcr.PropertyType.BOOLEAN | |
Whether or not a custom index is used | ||
Aggregated portlet preferences/settings: | ||
templates | javax.jcr.PropertyType.WEAKREFERENCE | |
A temporary Node holding all sub-templates used by the main template. See available properties in table below | ||
bundle | javax.jcr.PropertyType.WEAKREFERENCE | |
A temporary Node holding all i18n:ized texts used for output. See available properties in table below |
Name | Type and Description | |
---|---|---|
searchFormTemplate | javax.jcr.PropertyType.STRING | |
The search form Velocity template | ||
searchFormScriptTemplate | javax.jcr.PropertyType.STRING | |
The search form script Velocity template | ||
didYouMeanTemplate | javax.jcr.PropertyType.STRING | |
The Did you mean Velocity template | ||
hitCountTemplate | javax.jcr.PropertyType.STRING | |
The hit count Velocity template | ||
pagingTemplate | javax.jcr.PropertyType.STRING | |
The paging Velocity template | ||
pagingScriptTemplate | javax.jcr.PropertyType.STRING | |
The paging script Velocity template | ||
hitsTemplate | javax.jcr.PropertyType.STRING | |
The search hits Velocity template | ||
noHitsTemplate | javax.jcr.PropertyType.STRING | |
The no hits/search error Velocity template |
Name | Type and Description | |
---|---|---|
searchTipText | javax.jcr.PropertyType.STRING | |
The i18n:ized search tip text (en: "To find what you are looking for, try one of the following:") | ||
checkSpellingText | javax.jcr.PropertyType.STRING | |
The i18n:ized check spelling text (en: "Check spelling.") | ||
useGenericText | javax.jcr.PropertyType.STRING | |
The i18n:ized use generic text (en: "Use less words or more common words.") | ||
useSynonymText | javax.jcr.PropertyType.STRING | |
The i18n:ized use synonym text (en: "Try a synonym or a similar term.") | ||
useWildcardText | javax.jcr.PropertyType.STRING | |
The i18n:ized use wildcard text (en: "Use an asterisk to find other word endings. If you want to search for web<em>site</em> and web<em>page</em>, use web*.") | ||
searchHereText | javax.jcr.PropertyType.STRING | |
The i18n:ized search here text (en: "Search here") | ||
numberOfHitsText | javax.jcr.PropertyType.STRING | |
The i18n:ized number of hits text (en: "Number of hits:") | ||
youSearchedForText | javax.jcr.PropertyType.STRING | |
The i18n:ized you searched for text (en:"You searched for:") | ||
didYouMeanText | javax.jcr.PropertyType.STRING | |
The i18n:ized did you mean text (en: "Did you mean:") | ||
lastModifiedText | javax.jcr.PropertyType.STRING | |
The i18n:ized last modified text (en: "Last modified:") | ||
sizeText | javax.jcr.PropertyType.STRING | |
The i18n:ized size text (en: "Size:") | ||
previousText | javax.jcr.PropertyType.STRING | |
The i18n:ized previous text (en: "Previous") | ||
nextText | javax.jcr.PropertyType.STRING | |
The i18n:ized next text (en: "Next") | ||
showingHitText | javax.jcr.PropertyType.STRING | |
The i18n:ized showing hit text (en: "Showing hit") | ||
showingHitsText | javax.jcr.PropertyType.STRING | |
The i18n:ized showing hits text (en: "Showing hits") | ||
ofText | javax.jcr.PropertyType.STRING | |
The i18n:ized of text (en: "of") | ||
noHitsPatternText | javax.jcr.PropertyType.STRING | |
The i18n:ized and parameterized no hits text (en: "Your search <strong>{0}</strong> did not match any documents") | ||
searchPhraseHitCountPatternText | javax.jcr.PropertyType.STRING | |
The i18n:ized and parameterized phrase/count text (en: "Your search <strong>{0}</strong> resulted in <strong>{1}</strong> {1,choice,0#hits|1#hit|2#hits}") |
Sidan uppdaterad:
Nästa generations publiceringsverktyg är här!