- Copyright:
- Copyright (C) 2005-2020 Alfresco Software Limited
- License:
- GNU Lesser General Public License, see: Open Source Licensing
- Source:
Extends
- alfresco/documentlibrary/AlfDocumentFilters
Members
-
blockIncludeFacetRequest :boolean
-
This has been added to support the initial implementation of date and size faceting against Solr 1.4. The search service will always include modification/creation date and file size filter data in all search responses as these are hard-coded into the Search API as facet queries and so requesting those as filters will generate unnecessary and confusing response data
Type:
- boolean
- Default Value:
- false
- Source:
-
facetQName :string
-
This should be configured to be a QName for use as a facet
Type:
- string
- Default Value:
- null
- Source:
-
filterPrefsName :string
-
Type:
- string
- Default Value:
- "docListFilterPref"
- Source:
-
fullWidthClick :boolean
-
Indicates whether or not the full width of the child filters (including the count and the white space) can be clicked to toggle the filter. The corresponding attribute will be set on each filter.
Type:
- boolean
- Since:
- 1.0.47
- Default Value:
- false
- Source:
-
hitThreshold :number
-
The number hits that a filter should have in order for it to be shown.
Type:
- number
- Default Value:
- null
- Source:
-
maxFilters :number
-
The number of filters that should be shown for each facet. If this is null then there is no maximum
Type:
- number
- Default Value:
- null
- Source:
-
minFilterValueLength :number
-
The length (in number of characters) that a filter should have in order for it to be shown. This is particularly relevant for facets similar to description where lots of short meaningless filters might be returned.
Type:
- number
- Default Value:
- null
- Source:
-
sortBy :string
-
How the filters are ordered. The options are:
- ALPHABETICALLY (sort alphabetically by label)
- ASCENDING (ascending number of hits)
- DESCENDING (descending number of hits)
Type:
- string
- Default Value:
- "ALPHABETICALLY"
- Source:
-
useHash :boolean
-
Pass through setting for useHash on initialised FacetFilter widgets
Type:
- boolean
- Default Value:
- false
- Source:
Methods
-
_alphaSort(a, b) → {number}
-
A function for sorting the facet filter values alphabetically (from a-b)
Parameters:
Name Type Description a
object The first filter value object b
object The second filter value object - Source:
Returns:
-1, 0 or 1 according to standard array sorting conventions- Type
- number
-
_ascSort(a, b) → {number}
-
A function for sorting the facet filter values hits from low to high
Parameters:
Name Type Description a
object The first filter value object b
object The second filter value object - Source:
Returns:
-1, 0 or 1 according to standard array sorting conventions- Type
- number
-
_descSort(a, b) → {number}
-
A function for sorting the facet filter values hits from high to low
Parameters:
Name Type Description a
object The first filter value object b
object The second filter value object - Source:
Returns:
-1, 0 or 1 according to standard array sorting conventions- Type
- number
-
_indexSort(a, b) → {number}
-
A function for sorting the facet filter value index. The index is a special attribute that is only included on custom facet query fields. These are the created, modified and size properties.
Parameters:
Name Type Description a
object The first filter value object b
object The second filter value object - Source:
Returns:
-1, 0 or 1 according to standard array sorting conventions- Type
- number
-
_reverseAlphaSort(a, b) → {number}
-
A function for sorting the facet filter values into reverse alphabetical order (from z-a)
Parameters:
Name Type Description a
object The first filter value object b
object The second filter value object - Source:
Returns:
-1, 0 or 1 according to standard array sorting conventions- Type
- number
-
filterFacetFilters(filter, index)
-
Filters out any filter values that do not meet the hits or value length requirements.
Parameters:
Name Type Description filter
object The filter to test index
number The index of the filter - Source:
-
postCreate()
-
Processes any widgets defined in the configuration for this instance.
- Source:
-
processFacetFilters(payload)
-
This function is expectd to handle generation of filters relevant to the current search results. It clears out the previous filters and adds the new ones
Parameters:
Name Type Description payload
object The details of the filters to generate - Source:
-
publishFacets()
-
- Source:
-
sortFacetFilters(filters) → {array}
-
Sorts the filter values based on the sortBy attribute.
Parameters:
Name Type Description filters
array The processed filters to sort - Source:
Returns:
The sorted filters- Type
- array