You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Grant Ingersoll <gs...@apache.org> on 2009/07/15 23:26:30 UTC

TokenFilter/Tokenizers and ResourceLoaderAware

For the DelimitedPayloadTokenFilter, there is a dependency on a  
PayloadEncoder.  Now, there are a couple of implementations in Lucene  
of PayloadEncoder, but I think it would be nice if people could  
specify their own Encoder.  However, it doesn't appear that the  
TokenStream Factories are looking to see if something is  
ResourceLoaderAware.

Thoughts?

-Grant

Re: TokenFilter/Tokenizers and ResourceLoaderAware

Posted by Grant Ingersoll <gs...@apache.org>.
D'oh,  was looking at the wrong part of code instead of just looking  
at who implements RLA.  Thx...

On Jul 15, 2009, at 6:36 PM, Mark Miller wrote:

> On Wed, Jul 15, 2009 at 5:26 PM, Grant Ingersoll  
> <gs...@apache.org>wrote:
>
>> For the DelimitedPayloadTokenFilter, there is a dependency on a
>> PayloadEncoder.  Now, there are a couple of implementations in  
>> Lucene of
>> PayloadEncoder, but I think it would be nice if people could  
>> specify their
>> own Encoder.  However, it doesn't appear that the TokenStream  
>> Factories are
>> looking to see if something is ResourceLoaderAware.
>>
>> Thoughts?
>>
>> -Grant
>>
>
> TokenFilterFactorys can be ResourceLoaderAware - isn't that all you  
> need to
> supply a custom PayloadEncoder? The ResourceLoaderAware  
> TokenFilterFactory
> would use the ResourceLoader to instantiate the PayloadEncoder and  
> pass it
> to the DelimitedPayloadTokenFilter?
>
> I guess I'm confused by TokenStream Factories - if you mean
> TokenFilterFactories, than they can be SolrResourceLoader aware -  
> some are
> already.
>
> -- 
> -- 
> - Mark
>
> http://www.lucidimagination.com


Re: TokenFilter/Tokenizers and ResourceLoaderAware

Posted by Mark Miller <ma...@gmail.com>.
On Wed, Jul 15, 2009 at 5:26 PM, Grant Ingersoll <gs...@apache.org>wrote:

> For the DelimitedPayloadTokenFilter, there is a dependency on a
> PayloadEncoder.  Now, there are a couple of implementations in Lucene of
> PayloadEncoder, but I think it would be nice if people could specify their
> own Encoder.  However, it doesn't appear that the TokenStream Factories are
> looking to see if something is ResourceLoaderAware.
>
> Thoughts?
>
> -Grant
>

TokenFilterFactorys can be ResourceLoaderAware - isn't that all you need to
supply a custom PayloadEncoder? The ResourceLoaderAware TokenFilterFactory
would use the ResourceLoader to instantiate the PayloadEncoder and pass it
to the DelimitedPayloadTokenFilter?

I guess I'm confused by TokenStream Factories - if you mean
TokenFilterFactories, than they can be SolrResourceLoader aware - some are
already.

-- 
-- 
- Mark

http://www.lucidimagination.com