SilverStripe solr Search

QueryComponentFilterTrait

Trait QueryComponentFilterTrait

Methods for creating the filters on query time.

Table of Contents

Properties

$clientQuery  : Query
$query  : BaseQuery

Methods

buildClassFilter()  : void
Add filtered queries based on class hierarchy We only need the class itself, since the hierarchy will take care of the rest
buildCriteriaFilter()  : Criteria
Convert a field/value filter pair to a Criteria object that can build part of a Solr query.
buildExcludes()  : void
Remove items to exclude
buildFilters()  : void
Create filter queries
buildViewFilter()  : void
Add filtering on canView

Properties

Methods

buildClassFilter()

Add filtered queries based on class hierarchy We only need the class itself, since the hierarchy will take care of the rest

protected buildClassFilter() : void

buildCriteriaFilter()

Convert a field/value filter pair to a Criteria object that can build part of a Solr query.

protected buildCriteriaFilter(string $field, mixed $value) : Criteria

If a Criteria object is passed as the value, it will be returned unmodified.

Parameters
$field : string
$value : mixed
Return values
Criteria

        
On this page

Search results