FYI: In general we try to make sure that whenever posible we have a 
Factory for any TokenFilter or Tkenizer that ships with Lucene-Core or the 
Lucene Analysis contrib ... we have a stub-analysis-factory-maker.pl 
script that automates this in most cases, and requires a small amount of 
coding for others -- but in some cases there is no easy way to create a 
"generic" factor for a TokenFilter, HyphenationCompoundWordTokenFilter is 
an example of this becuase it requires a HyphenationTree to construct it, 
and HyphenationTree is a fairly complicated class, that didnt' lend itself 
to an easy XML configuration for construction.

But if you have a specific HyphenationTree instance you wnat to use, you 
can hardcode that into a custom TokenFilterFactory.

*BUT* before you do that, consider whether or not the 
DictionaryCompoundWordTokenFilter will meet your needs -- there is already 
a Solr Factory checked in for that.

: See http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
: 
: Essentially, you need to create a TokenFilterFactory that wraps it.  Please
: feel free to donate it, too, if you can.
: 
: -Grant
: 
: On Jul 23, 2008, at 2:42 PM, Barry Harding wrote:
: 
: > Hi can anybody point me in the right direction in how I go about adding
: > the
: > 
: > org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter
: > 
: > Token filter to the solr schema.xml.
: > 
: > 
: > 
: > 
: > 
: > I need to be able to break German compound words, and from what I have
: > read this Token filter would seem to be what I need to use, my question
: > is how do I configure SOLR to use this filter text field types.
: > 
: > 
: > 
: > Is it possible to just call it directly from the confog file or do I
: > need to wrap it in a custom class in some way
: > 
: > 
: > 
: > Thanks
: > 
: > 
: > 
: > Barry H
: > 
: > 
: > ________________________________________________________________________
: > Misco is a division of Systemax Europe Ltd.  Registered in Scotland Number
: > 114143.  Registered Office: Caledonian Exchange, 19a Canning Street,
: > Edinburgh EH3 8EG.  Telephone +44 (0)1933 686000.
: 
: --------------------------
: Grant Ingersoll
: http://www.lucidimagination.com
: 
: Lucene Helpful Hints:
: http://wiki.apache.org/lucene-java/BasicsOfPerformance
: http://wiki.apache.org/lucene-java/LuceneFAQ
: 
: 
: 
: 
: 
: 
: 



-Hoss

Reply via email to