PHPackages                             csoellinger/silverstripe-ps-search - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. csoellinger/silverstripe-ps-search

ActiveSilverstripe-vendormodule[Search &amp; Filtering](/categories/search)

csoellinger/silverstripe-ps-search
==================================

Search engine for Silverstripe websites - forked from plasticstudio/search which forked from jaedb/search

1.1.2(3y ago)0191BSD-3-ClausePHP

Since Mar 21Pushed 3y agoCompare

[ Source](https://github.com/CSoellinger/SilverStripe-Search)[ Packagist](https://packagist.org/packages/csoellinger/silverstripe-ps-search)[ Docs](https://github.com/CSoellinger)[ RSS](/packages/csoellinger-silverstripe-ps-search/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (3)Versions (8)Used By (0)

***!!! Note: This is a fork from  and exists only till pull request will be accepted. If they will not this addon will try to keep same feature like existing forks. Differences to the forks are some config features like include\_css or include\_js or the extended JoinTables thing. If Pull Request will be merged i would delete this repo and you should go back to .***

---

The built-in SilverStripe search form is a very simple search engine. This plugin takes SQL-based searching to the next level, without requiring the implementation of a full-blown search engine like Solr or Elastic Search. It is designed to bring data-oriented filters on top of the simple text search functionality.

Requirements
============

[](#requirements)

- SilverStripe 4

Usage
=====

[](#usage)

- Create a `SearchPage` instance (typically at the root of your website). This page only is used to display results, so please refrain from creating multiple instances.
- Configure your website's `_config/config.yml` (or add `_config/search.yml`) to define search parameters.
- Run `dev/build` to instansiate your new configuration (this will also automatically create an instance of `SearchPage` if one does not exist).
- To overwrite the default `SearchPage` tmeplate, add a template file to your application: `templates/PlasticStudio/Search/Layout/SearchPage.ss`

Elemental
=========

[](#elemental)

- Elemental search is included
- On page or Element save, all content from all Elements is saved to a field called `ElementalSearchContent` on sitetree.
- Simply include `'SiteTree_Live.ElementalSearchContent'` to the list of page columns
- Currently there is no way to exclude individual elements from being included.
- Run IndexPageContentForSearchTask to index element content

Configuration
=============

[](#configuration)

- `include_css`: include search default stylings (`true`/`false`)
- `include_js`: include search default scripts (`true`/`false`)
- `types`: associative list of types to search
    - `Label`: front-end field label
    - `Table`: the object's primary table (note `_Live` suffix for versioned objects)
    - `ClassName`: full ClassName
    - `ClassNameShort`: namespaced ClassName
    - `JoinTables`: Join Tables. (format `JoinTable` or `JoinTable.Column` or `JoinTable.Column: JoinTableOn.Column` or `JoinTable: [JoinTableFrom.Column: JoinTableOn.Column]`. Look below for examples)
    - `Filters`: a list of filters to apply pre-search
    - `Columns`: columns to search for query string matches (format `Table.Column`)
- `filters`: associative list of filter options
    - `Structure`: defines the filter's relational structure (must be one of `db`, `has_one` or `many_many`)
    - `Label`: front-end field label
    - `Table`: relational subject's table
    - `Column`: column to filter on
    - `Operator`: SQL filter operator (ie `>`, `
