Provides Q&A pages and Solr-based search
This module provides FAQ functionality on top of Solr.
Just by adding the module to the project, you'll get a ModelAdmin for FAQs, where you can manage Questions & Answers. You only need to add an FAQPage type (comes with the module), and some questions and answers.
The module comes with its own Solr search index, customized to have a fuzzy search, and has its own file for stopwords and synonyms.
- Fulltextsearch module, v2.1.0 or up.
- Phockito and PHPunit for testing, not required if you don't care about running tests.
Edit your project-wide composer.json file as follows; in the "require" block add:
Then in the root of your project run:
#> composer update silverstripe/faq
composer install silverstripe/faq
Run a database rebuild by visiting http://yoursite.com/dev/build. This will add the required database
columns and tables for the module to function.
Remember to do
Check how to configure this module to behave like CWP-Solr on the docs.
Add a FAQPage to your CMS
Add an FAQ on the FAQ ModelAdmin sidebar link
Wait for Solr to reindex
Search your FAQ page :)
All templates can be overloaded from within your project themes directory. Module default templates can be found in the module's
FAQ module comes with a default set of templates to start the Solr index. If you want to override the path from where this files come from, you need to add a YAML file like this.
--- Name: faqoverride After: 'faq/*' --- FAQSearchIndex: options: extraspath: 'new/path/to/extrapath' templatespath: 'new/path/to/template' FAQ: question_boost: '3' answer_boost: '1' keywords_boost: '4'
Featured FAQs appear on the FAQ Page before a user performs a search. These can be added and organised from the
Featured FAQs tab of the FAQ Page CMS admin.
FAQ searches performed on the FAQ page are logged so that a record is kept of the search term used and the results pages and FAQ articles that were viewed as a result of the search. There is also functionality to rate and leave a comment about an FAQ article.
All of this search data is available in the CMS in the "Search Log" section. CMS users can filter the data on numerous criteria and drill into results to find and rectify gaps in the knowledge base.
There are convenient links through to FAQ articles for content authors to amend the content and keywords for an article in order to boost the article higher in search results for appropriate search terms.
To connect all of this data together a session ID is associated with each record along with a search log ID passed as a GET param. This helps to prevent the data integrity being corrupted when URLs are shared between browsers and sessions. Further description of the functionality is described in the FAQ search logging unit test.
- Get static config variables from yml files for controller
- Pagetypes, search index and dataobjects easily extendable
- version FAQs or move to inherit from SiteTree
- cwp manual configuration if not using
- make this a supported SS module
- Better approach for archiving search logs and related data