6eb6ebacb4
Enable macrons and non-ASCII chars in search by default Via the use of [`ASCIIFoldingFilter`](https://lucene.apache.org/solr/guide/6_6/filter-descriptions.html#FilterDescriptions-ASCIIFoldingFilter) which will convert chars from outside the ASCII range to their closest equivalent - e.g. an ō into a simple o. >## ASCII Folding Filter >This filter converts alphabetic, numeric, and symbolic Unicode characters which are not in the Basic Latin Unicode block (the first 127 ASCII characters) to their ASCII equivalents, if one exists. This filter converts characters from the following Unicode blocks: > > - C1 Controls and Latin-1 Supplement (PDF) > - Latin Extended-A (PDF) > - Latin Extended-B (PDF) > - Latin Extended Additional (PDF) > - Latin Extended-C (PDF) > - Latin Extended-D (PDF) > - IPA Extensions (PDF) > - Phonetic Extensions (PDF) > - Phonetic Extensions Supplement (PDF) > - General Punctuation (PDF) > - Superscripts and Subscripts (PDF) > - Enclosed Alphanumerics (PDF) > - Dingbats (PDF) > - Supplemental Punctuation (PDF) > - Alphabetic Presentation Forms (PDF) > - Halfwidth and Fullwidth Forms (PDF) > > > **Factory class**: solr.ASCIIFoldingFilterFactory > > **Arguments**: > `preserveOriginal` - (boolean, default false) If true, the original token is preserved: "thé" → "the", "thé" > > **Example**: > ```xml > <analyzer> > <tokenizer class="solr.WhitespaceTokenizer"/> > <filter class="solr.ASCIIFoldingFilterFactory" preserveOriginal="false" /> > </analyzer> > ``` > **In**: "á" (Unicode character 00E1) > **Out**: "a" (ASCII character 97) |
||
---|---|---|
_config | ||
bin | ||
conf/solr | ||
docs | ||
src | ||
templates/Layout | ||
tests | ||
_config.php | ||
.editorconfig | ||
.gitattributes | ||
.scrutinizer.yml | ||
.travis.yml | ||
.upgrade.yml | ||
changelog.md | ||
code-of-conduct.md | ||
codecov.yml | ||
composer.json | ||
license.md | ||
phpcs.xml.dist | ||
phpunit.xml.dist | ||
README.md |
FullTextSearch module
Adds support for fulltext search engines like Sphinx and Solr to SilverStripe CMS.
Maintainer Contact
- Hamish Friedlander <hamish (at) silverstripe (dot) com>
Requirements
- SilverStripe 4.0+
Note: For SilverStripe 3.x, please use the 2.x release line.
Documentation
For pure Solr docs, check out the Solr 4.10.4 guide.
See the docs for configuration and setup, or for the quick version see the quick start guide.
For details of updates, bugfixes, and features, please see the changelog.
TODO
-
Get rid of includeSubclasses - isn't actually used in practice, makes the codebase uglier, and ClassHierarchy can be used at query time for most of the same use cases
-
Fix field referencing in queries. Should be able to do
$query->search('Text', 'Content')
, not$query->search('Text', SiteTree::class . '_Content')
like you have to do now-
Make sure that when field exists in multiple classes, searching against bare fields searches all of them
-
Allow searching against specific instances too
-
-
Make fields restrictable by class in an index - 'SiteTree#Content' to limit fields to a particular class, maybe 'Content->Summary' to allow calling a specific method on the field object to get the text
-
Allow following user relationships (Children.Foo for example)
-
Be clearer about what happens with relationships to stateful objects (e.g. Parent.Foo where Parent is versioned)
-
Improvements to SearchUpdater
-
Make it work properly when in-between objects (the A in A.B.Foo) update
-
Allow user logic to cause triggering reindex of documents when field is user generated
-
-
Add generic APIs for spell correction, file text extraction and snippet generation