Predefined search

Elements available in the Velocity Context

Name

Type and description

jcrSession

javax.jcr.Session


The JCR Session

portlet

javax.jcr.Node


This portlet. See properties below

request

javax.portlet.PortletRequest


The portlet request

searchResult

senselogic.sitevision.api.search.SearchResult


The search result

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

 

Additional properties available for the portlet element ($portlet)

Name

Type and Description



 

QUERYING

evaluatePredefinedSearchQuery

javax.jcr.PropertyType.BOOLEAN

 

Whether predefinedSearchQuery should be evaluated via Velocity or not

predefinedSearchQuery

javax.jcr.PropertyType.STRING

 

The search query expression



 

TYPE RESTRICTIONS

includeArticles

javax.jcr.PropertyType.BOOLEAN

 

Whether or not to include articles in the search result

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

includeStructurePages

javax.jcr.PropertyType.BOOLEAN

 

Whether or not to include structure pages in the search result

  
 

NO HITS / SEARCH FAILED

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)

showSearchError

javax.jcr.PropertyType.BOOLEAN

 

Whether or not to show search errors or no hits messages

  
 

INDEX FIELDS

lastPublishedField

javax.jcr.PropertyType.STRING

 

Name of the last published field

mimetypeField

javax.jcr.PropertyType.STRING

 

Name of the mime type field

nameField

javax.jcr.PropertyType.STRING

 

Name of the name field

namepathField

javax.jcr.PropertyType.STRING

 

Name of the name path field

siteField

javax.jcr.PropertyType.STRING

 

Name of the site field

sizeField

javax.jcr.PropertyType.STRING

 

Name of the size field

summaryField

javax.jcr.PropertyType.STRING

 

Name of the summary field

titleField

javax.jcr.PropertyType.STRING

 

Name of the title field

uriField

javax.jcr.PropertyType.STRING

 

Name of the relative URL field

urlField

javax.jcr.PropertyType.STRING

 

Name of the absolute URL field




HIT COUNT

maxSearchHits

javax.jcr.PropertyType.LONG


Maximum number of search hits

useMaxSearchHits

javax.jcr.PropertyType.BOOLEAN


Whether or not to limit number of search hits

  
 

SEARCH HITS

headingField

javax.jcr.PropertyType.STRING


What field to fetch the heading text from ("nameField" or "titleField", see Index fields section above)

searchHitBackgroundColor

javax.jcr.PropertyType.WEAKREFERENCE

 

The background color for every odd search hit (sv:color)

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

searchHitHeadingFont

javax.jcr.PropertyType.WEAKREFERENCE


The hit heading font Node (sv:font)

searchHitInfoFont

javax.jcr.PropertyType.WEAKREFERENCE


The hit info font Node (sv:font)

searchHitPathFont

javax.jcr.PropertyType.WEAKREFERENCE


The hit path font Node (sv:font)

showFileIcons

javax.jcr.PropertyType.BOOLEAN

 

Whether or not a file icons should be displayed for each search hit

showSearchHitExcerpt

javax.jcr.PropertyType.BOOLEAN


Whether or not to show hit excerpts

showSearchHitInfo

javax.jcr.PropertyType.BOOLEAN


Whether or not to show hit info (date + size)

showSearchHitNumbering

javax.jcr.PropertyType.BOOLEAN


Whether or not search hits should be displayed numbered

showSearchHitPath

javax.jcr.PropertyType.BOOLEAN


Whether or not to show a linked path to the search hit

useSearchHitBackgroundColor

javax.jcr.PropertyType.BOOLEAN

 

Whether or not a searchHitBackgroundColor (see line below) are in use

  
 

MISC

useCustomIndex

javax.jcr.PropertyType.BOOLEAN

 

Whether or not a custom index is used

useCustomSortFields

javax.jcr.PropertyType.BOOLEAN


Whether or not to use custom sort fields (i.e. use a custom "relevance" sorting")



 

AGGREGATED PORTLET PREFERENCES/SETTINGS:

bundle

javax.jcr.PropertyType.WEAKREFERENCE

 

A temporary Node holding all i18n:ized texts used for output. See available properties in table below

templates

javax.jcr.PropertyType.WEAKREFERENCE

 

A temporary Node with sub-nodes that holds properties about all letters. See available properties for letters sub-nodes in table below

  

 

Properties available for the templates Node

Name
Type and Description

hitsTemplate

javax.jcr.PropertyType.STRING

 

The search hits Velocity template

noHitsTemplate

javax.jcr.PropertyType.STRING

 

The no hits/search error Velocity template



Properties available for the bundle Node

Name
Type and Description

lastModifiedText

javax.jcr.PropertyType.STRING

 

The i18n:ized last modified text (en: "Last modified:")

noInformationAvailableText

javax.jcr.PropertyType.STRING

 

The i18n:ized last modified text (en: "No information available")

sizeText

javax.jcr.PropertyType.STRING

 

The i18n:ized size text (en: "Size:")