2017 © Pedro Peláez
 

silverstripe-module solr

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

image

silverstripe/solr

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  • Wednesday, July 4, 2018
  • by nyeholt
  • Repository
  • 3 Watchers
  • 19 Stars
  • 12,180 Installations
  • PHP
  • 0 Dependents
  • 1 Suggesters
  • 15 Forks
  • 20 Open issues
  • 31 Versions
  • 5 % Grown

The README.md

Solr Search Module

A module that extends the base functionality of the extensible search module, adding the ability to index and search content from a Solr instance., (*1)

Version Information

  • The 2.0 branch is compatible with SilverStripe 3.0
  • The 3.0 branch is compatible with SilverStripe 3.1 and contains its own SearchPage implementation
  • The master branch is compatible with SilverStripe 3.1, but relies on the Extensible Search module for a search page implementation

Requirements

  • Solr 4.0 installed and running (a test instance is included, but for production use, please install and configure)
  • The extensible search module if you're wanting to have a CMS configurable search page.

Extensible Search Upgrade Notes

If you have recently been using the solr search module prior to the extensible search upgrade, the following steps will need to be taken., (*2)

  • Add the configuration from extensions.yml.sample to your project configuration to bind the SolrSearch extension to the ExtensibleSearchPage
  • Replace most YML and code SolrSearchPage references with ExtensibleSearchPage, unless you have something which still directly depends on the new SolrSearch extension.
  • /dev/tasks/SolrSearchPageMigrationTask to update all search page references

Quick Usage Overview

Install Solr (packages available for most OSes)

For demonstration and testing purposes, a standalone Jetty based installation of solr is available in the solr/ subdirectory. To execute, simply change to that directory and run java -jar start.jar - the default settings will be fine for evaluation., (*3)

If you are running a custom Solr instance, make sure to copy the solr/solr/solr/collection1/conf/schema.xml file to your solr instance - there are a couple of custom types defined that SilverStripe uses; the XML for these is below, if you want to place in your own schema.xml file., (*4)

   <!-- SilverStripe multivalue field and sortable support -->
   <dynamicField name="*_ms"  type="string"  indexed="true"  stored="true" multiValued="true"/>
   <dynamicField name="*_as"  type="alphaOnlySort"  indexed="true"  stored="true"/>

If you have a configuration different to the default locahost:8983/solr configuration, you can configure things by calling, (*5)

SolrSearchService::$solr_details = array();

Add the extensions

The following YAML will need to be added when using the extensible search page, so the solr search engine appears., (*6)

ExtensibleSearchPage:
  search_engine_extensions:
    SolrSearch: 'Solr'
  extensions:
    - 'SolrSearch'
ExtensibleSearchPage_Controller:
  extensions:
    - 'SolrSearch_Controller'

Add the SolrIndexable extension to any SiteTree objects you want to search. Support for other data objects may work, though file indexing is not yet supported, (*7)

Object::add_extension('SiteTree', 'SolrIndexable');

By default, the solr indexer will index Title and Content fields. If you want other fields indexed too, add them to your $searchable_fields static variable in your class type., (*8)

There is also an optional set of extensions available if you wish to enable an additional SiteTree index based on user permissions (rather than filtering the search result's response)., (*9)

This will require the Queued Jobs module to function, due to the recursive indexing when saving a page. https://github.com/silverstripe-australia/silverstripe-queuedjobs, (*10)

Object::add_extension('SiteTree', 'SiteTreePermissionIndexExtension');
Object::add_extension('ExtensibleSearchPage', 'SolrSearchPermissionIndexExtension');

Using facets

First, you need to tell the search page what you're going to be faceting on, (*11)

SolrSearch::$facets = array('MetaKeywords_ms');

then make sure that field (MetaKeywords) is included in the list of fields to index via the searchable_fields static., (*12)

*_ms represents a multivalue field. *_as represents a sortable field (which doesn't require tokenization)., (*13)

Template options

To customise search results displayed, provide a SolrSearch_results.ss file in your theme's templates directory., (*14)

API

GitHub Wiki, (*15)

Administration

If you have ADMIN privileges, you can start and stop the locally bundled jetty version of solr from within the CMS on the Solr admin section., (*16)

To set the java path (if different from /usr/bin/java), set, (*17)

SolrSearchService::$java_bin

to the appropriate path, (*18)

Troubleshooting

If you aren't getting any search results, first make sure Solr is running and has been indexed., (*19)

Maintainer Contact

Marcus Nyeholt, (*20)

, (*21)

Licensing

Solr is licensed under the Apache License This module is licensed under the BSD license, (*22)

The Versions

04/07 2018

dev-master

9999999-dev

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

04/07 2018

6.0.0

6.0.0.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

04/07 2018

5.4.x-dev

5.4.9999999.9999999-dev

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

04/07 2018

5.4.0

5.4.0.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

31/08 2017

5.3.0

5.3.0.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

21/02 2017

5.2.5

5.2.5.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

16/11 2016

5.2.4

5.2.4.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

11/11 2016

5.2.3

5.2.3.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

18/10 2016

5.2.2

5.2.2.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

18/10 2016

5.2.1

5.2.1.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

03/10 2016

5.2.0

5.2.0.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

16/08 2016

5.1.0

5.1.0.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

16/05 2016

4.1.x-dev

4.1.9999999.9999999-dev

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

16/05 2016

4.1.1

4.1.1.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

12/04 2016

3.0.x-dev

3.0.9999999.9999999-dev

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

03/02 2016

5.0.2

5.0.2.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

02/02 2016

5.0.1

5.0.1.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

22/01 2016

5.0.0

5.0.0.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

28/07 2015

4.1.0

4.1.0.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

27/05 2015

4.0.x-dev

4.0.9999999.9999999-dev

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

27/05 2015

4.0.2

4.0.2.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

27/03 2015

4.0.1

4.0.1.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

21/08 2014

4.0.0

4.0.0.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

30/05 2014

3.2.1

3.2.1.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

09/12 2013

3.2.0

3.2.0.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

05/12 2013

3.1.0

3.1.0.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

16/09 2013

2.0.x-dev

2.0.9999999.9999999-dev

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

15/08 2013

dev-ss30

dev-ss30

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

05/03 2013

2.2.0

2.2.0.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

03/03 2013

2.1.1

2.1.1.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr

11/02 2013

2.1.0

2.1.0.0

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

  Sources   Download

BSD-3-Clause

The Requires

 

search silverstripe solr