[TYPO3-Solr] Advanced search with SOLR

Jigal van Hemert jigal.van.hemert at typo3.org
Thu Jul 26 23:10:51 CEST 2012


Hi,

On 26-7-2012 14:13, Christian Bleicher - DieLobby Werbeagentur Gmbh wrote:
> Is there a way to implement a fuzzy search? It would be ok if it works
> like a mysql query like '%Regensb%'.

You could define a fieldType in schema.xml which also indexes parts of 
words. This would include something like:
<filter class="solr.NGramFilterFactory" minGramSize="3" maxGramSize="15"/>
(this indexes parts of words of 3-15 characters)

If you search on the web you can find lots of documentation and examples 
for this NGramFilterFactory.

You can create an extra field in the solr index which contains 
information from a number of TYPO3 fields. If you use that field in your 
advanced search strings like "gensb", "egen", "gen", etc. will all match 
"Regensberg".

-- 
Jigal van Hemert
TYPO3 Core Team member

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-project-solr mailing list