Merge pull request #140 from silverstripe-elliot/patch-2

Update Solr.md
This commit is contained in:
Daniel Hensby 2017-03-30 15:27:57 +01:00 committed by GitHub
commit 30e5b200e9
1 changed files with 11 additions and 0 deletions

View File

@ -191,6 +191,17 @@ from a new file `mysite/solr/templates/types.ss` instead:
return $this->renderWith(Director::baseFolder() . '/mysite/solr/templates/types.ss');
}
}
#### Searching for words containing numbers
By default, the fulltextmodule is configured to split words containing numbers into multiple tokens. For example, the word “A1” would be interpreted as “A” “1”; since “a” is a common stopword, the term “A1” will be excluded from search.
To allow searches on words containing numeric tokens, you'll need to update your overloaded template to change the behaviour of the WordDelimiterFilterFactory. Each instance of `<filter class="solr.WordDelimiterFilterFactory">` needs to include the following attributes and values:
* add splitOnNumerics="0" on all WordDelimiterFilterFactory fields
* change catenateOnNumbers="1" on all WordDelimiterFilterFactory fields
Update your index to point to your overloaded template using the method described above.
### Spell Checking ("Did you mean...")