Module: alfresco/services/SearchService

alfresco/services/SearchService

This service is intended to be used for performing searches. It was written specifically to service requests that can be rendered by the AlfSearchList widget.
Author:
  • Dave Draper
License:
Source:

Members

autoSuggestAPI :string

The URL to call to fetch auto suggest results
Type:
  • string
Source:

highlightFields :string

A comma-delimited string of the properties to apply search term highlighting to.
Type:
  • string
Since:
  • 1.0.99
Default Value:
  • "cm:name,cm:description,cm:title,content,ia:descriptionEvent,ia:whatEvent,lnk:title"
Source:

highlightFragmentSize :number

The number of characters to include in a highlight fragment of the content
Type:
  • number
Since:
  • 1.0.99
Default Value:
  • 255
Source:

highlightMaxAnalyzedChars :number

The number of characters to search into the content for the search term.
Type:
  • number
Since:
  • 1.0.99
Default Value:
  • null
Source:

highlightMergeContiguous :boolean

Collapse contiguous fragments into a single fragment. If the value is true it indicates that contiguous fragments will be collapsed into single fragment.
Type:
  • boolean
Since:
  • 1.0.99
Default Value:
  • false
Source:

highlightSnippetCount :number

The number of characters to include in a highlight snippet.
Type:
  • number
Since:
  • 1.0.99
Default Value:
  • 100
Source:

highlightUsePhraseHighlighter :number

Whether to use SpanScorer to highlight phrase terms only when they appear within the query phrase in the document.
Type:
  • number
Since:
  • 1.0.99
Default Value:
  • true
Source:

pageSize :number

This is the default number of items to return as a single page of result data. This value will be used if a specific value isn't supplied in a search request.
Type:
  • number
Default Value:
  • 25
Source:

query :string

This is the default query to use if one isn't supplied in a search request.
Type:
  • string
Source:

repo :boolean

This boolean indicates whether the entire repository should be searched. This value will be used if a specific value isn't supplied in a search request.
Type:
  • boolean
Default Value:
  • true
Source:

rootNode :string

This is the default node to use as the root of the search. This value will be used if a specific value isn't supplied in the search request.
Type:
  • string
Default Value:
  • "alfresco://company/home"
Source:

searchAPI :string

The URL to send a search request to
Type:
  • string
Source:

site :string

This is the default site to use. This value will be used if a specific value isn't supplied in the search request.
Type:
  • string
Source:

sort :string

This is the default sort to use. This value will be used if a specific value isn't supplied in the search request.
Type:
  • string
Source:

sortAscending :boolean

This is the default sort direction to use. This value will be used if a specific value isn't supplied in the search request.
Type:
  • boolean
Default Value:
  • true
Source:

startIndex :number

This is the default page index to use for multiple pages of search results. This value will be used if a specific value isn't supplied in a search request.
Type:
  • number
Default Value:
  • 0
Source:

tag :string

This is the default tag to use. This value will be used if a specific value isn't supplied in the search request.
Type:
  • string
Source:

Methods

onAutoSuggest(payload)

Retrieves a list of suggested search terms based on the supplied search term.
Parameters:
Name Type Description
payload object The auto-suggest payload. Should contain the current search term
Source:

onSearchRequest(payload)

Parameters:
Name Type Description
payload object The payload defining the document to retrieve the details for.
Source:

registerSubscriptions()

Sets up the subscriptions for the SearchService.
Since:
  • 1.0.32
Source: