This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.
There is no license information available for the latest version (dev-master) of this package.

Basic implementation of a FulltextSeach index and search form in SilverStripe

dev-master 2016-02-17 01:12 UTC

This package is auto-updated.

Last update: 2021-10-09 06:42:10 UTC


Extends the FullTextSearch module with a default configuration that provides a basic Solr configuration and search results page.

Since the FullTextSearch module is a work in progress and subject to change, this module should be considered alpha. In the near future, the FulltextSearch module may also provide this functionality out of the box.


To start using Solr, install this module along with the fulltextsearch module and run dev/build. After running the database rebuild, start the Solr server up.

The fulltextsearch module provides a basic server suitable for testing. To start that run:

cd fulltextsearch/thirdparty/solr/server/ && java -jar start.jar &

If Solr has started up and is running, we should first make sure the data directory exists (default: /data/solr) or configured by the SOLR_BASE_PATH value in your _ss_environment.php file.

mkdir /data/solr

Ensure that your web server can write to that folder. Then to populate that directory run the configure task:

sake dev/tasks/Solr_Configure

That will populate the /data/solr/FulltextSearchDefaultIndex/conf directory with the configuration files such as schema.xml and solrconfig.xml. More information about these files can be found in the Solr Manual

For more information about the SilverStripe wrapper around Solr consult the fulltextsearch module directly.


This module will provide a new page type in the CMS called FulltextSearchDefaultPage along with a default index. More about customizing the index is below.

Both the page type and the index are designed to be starting points for developers to use to extend to make the most of their Solr service.

Extending the built in indexes

To index your own dataobjects, subclass the FulltextSearchDefaultIndex class and add your own types in.


class CustomFulltextSearchIndex extends FulltextSearchDefaultIndex {

	public function init() {

		// adds a new dataobject to the search

		// define a new field to search
		$this->addFulltextField('ProductDescription', 'HTMLText')

Tell the FulltextSearchDefaultPage that you want to use your new index by using the Config api.

  index_class: CustomFulltextSearchIndex