On Jul 27, 2009, at 7:06 AM, prerna07 wrote:


Hi,

I want to create a txt file named as lemmatisation.txt and want to use it
through filter factory. This flow will work similar to synonym filter
factory

please provide information on below mentioned points;

1) What are the steps to create a new filter factory which is similar to
synonym filter factory.

I usually just build them by looking at some other one that is similar to the one you are building. Essentially, you need to capture/ configure any settings you need and then create the TokenStream. See also http://wiki.apache.org/solr/SolrPlugins#head-718653697f60b44092280c8c506077e0933e3668


2) What are the drawbacks / best practices of creating new filter factory.

It's usually pretty straightforward. I would guess the only one is to recognize that creating TokenStreams can happen a lot, so try to do any work you can in the init phase.


3) Do we need to change lucene code for the same.

Not likely.  Sounds like you have your own TokenFilter, right?

--------------------------
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids) using Solr/Lucene:
http://www.lucidimagination.com/search

Reply via email to