Chantal Ackermann wrote: > Hi all, > > I would have two questions about the ReversedWildcardFilterFactory: > a) put it into both chains, index and query, or into index only? > b) where exactly in the/each chain do I have to put it? (Do I have to > respect a certain order - as I have wordDelimiter and lowercase in > there, as well.) > > More Details: > > I understand it is used to allow queries like "*sport". > > My current configuration for the field I want to use it for contains > this setup: > > <fieldType name="text_cn" class="solr.TextField"> > <analyzer> > <filter class="solr.WordDelimiterFilterFactory" > splitOnCaseChange="1" splitOnNumerics="1" > stemEnglishPossessive="1" generateWordParts="1" > generateNumberParts="1" catenateAll="1" > preserveOriginal="1" /> > <filter class="solr.LowerCaseFilterFactory" /> > </analyzer> > </fieldType> > > The wiki page > http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters states for > the ReversedWildcardFF: > "Add this filter to the index analyzer, but not the query analyzer." > > However, the API for it says it provides functionality at index and > query time (my understanding): > "When this factory is added to an analysis chain, it will be used both > for filtering the tokens during indexing, and to determine the query > processing of this field during search." > > Any help is greatly appreciated. > Thanks! > Chantal > > > You just put it in the index chain, not the query chain. The SolrQueryParser will consult it when building a wildcard search - don't put it in the query chain. I know, appears like a bit of magic. That Andrzej is a wizard though, so it makes sense ;)
-- - Mark http://www.lucidimagination.com