By default, a standard search index CWP\Search\Solr\CwpSolrIndex
is included in the Solr Search Recipe (provided through the included cwp/cwp-search module). This includes the basic configuration necessary for searching pages.
This document aims to describe this specific configuration. More options on how to configure indexes are described in fulltextsearch module documentation.
This index extends the core CWP\Search\CwpSearchIndex
abstract class, which includes additional functionality. Please note that if you want to index other database fields or need to create a custom index, it is necessary to extend this base class (CWP\Search\CwpSearchIndex
) in order to use much of the functionality detailed in this section (e.g. spell checking).
Note: The line $this->addFilterField('ShowInSearch');
is a standard requirement, and will need to be added to any custom indexes created.
Note: This article makes reference to the 'cwp*' namespace, this is a hang-over of the product's prior branding. Introduction to Silverstripe Cloud Public Sector explains the CWP reference for those not familiar.