lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Implementing a custom ResourceLoader
Date Mon, 03 Oct 2011 17:40:32 GMT

: As part of writing a solr plugin I need to override the ResourceLoader. My
: plugin is intended stop word analyzer filter factory and I need to change
: the way stop words are being fetched. My assumption is overriding
: ResourceLoader->getLines() will help me to meet my target of fetching stop
: word data from an external webservice.
: Is thisi feasible? Or should I go about overriding
: Factory->inform(ResourceLoader) method. Kindly let me know how to achieve
: this.

I would not approach your problem by trying to customize hte 
ResourceLoader ... if your goal is to get the list of words from some 
location other then a file, owuld just make your TokenFilterFactory read 
the stopwords from wherever you wan to read them.

ResourceLoader.getLines() is just a convinience method for dealing with 
the local paths and classpaths and stripping out comment lines -- trying 
to subclasses ResourceLoader when you don't need 90% of that functionality 
is a bad idea.


View raw message