\SolrSearch
Synopsis
class SolrSearch
extends DataExtension
{
- // constants
- const BOOST_MAX = 10;
- const RESULTS_ACTION = 'getSearchResults';
- // members
- private static array $db = ;
- public static boolean $supports_hierarchy = true;
- private static array $facets = ;
- protected SolrResultSet $query;
- protected SolrSearchService $solr;
- private static String $filter_param = 'filter';
- private static array $default_searchable_types = ;
- public static array $dependencies = ;
- private static array $additional_search_types = ;
- public SolrSearchService $solrSearchService;
- // methods
- public void updateExtensibleSearchPageCMSFields()
- public array getSelectableFields()
- public void searchableTypes()
- public void getSolr()
- public void fieldsForFacets()
- public SolrResultSet getQuery()
- public void getActiveFacets()
- public ArrayList AllFacets()
- protected type facetFieldMapping()
- public void currentFacets()
- public void updateSource()
- public array getQueryBuilders()
- public void queryFacets()
- public String SearchQuery()
Hierarchy
Extends
- DataExtension
Constants
Name | Value |
---|---|
BOOST_MAX | 10 |
RESULTS_ACTION | 'getSearchResults' |
Members
private
- $additional_search_types
- $db
- $default_searchable_types
—
array
The default classes to search on. - $facets
—
array
The facets we're interested in for this search page. This will be made a little more flexible in later releases. - $filter_param
—
String
Used for the url param
protected
- $query
—
SolrResultSet
A local cache of the current query the user is executing based on data in the request - $solr — SolrSearchService
public
- $dependencies
- $solrSearchService — SolrSearchService
- $supports_hierarchy
Methods
protected
- facetFieldMapping() — Retrieve the mapping of facet field name (eg FieldName_mt) mapped to the user entered nice name
public
- AllFacets() — Retrieve all facets in the result set in a way that can be iterated over conveniently.
- SearchQuery() — Returns a url parameter string that was just used to execute the current query.
- currentFacets() — Get the list of facet values for the given term
- fieldsForFacets() — Figures out the list of fields to use in faceting, based on configured / defaults
- getActiveFacets() — Gets a list of facet based filters
- getQuery() — Get the currently active query for this page, if any
- getQueryBuilders() — Gets the list of query parsers available
- getSelectableFields() — Return the fields that can be selected for sorting operations.
- getSolr() — Get the solr instance.
- queryFacets() — Get the list of field -> query items to be used for faceting by query
- searchableTypes() — get the list of types that we've selected to search on
- updateExtensibleSearchPageCMSFields()
- updateSource() — Add in any explicitly configured types.