You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Jerven Bolleman <je...@isb-sib.ch> on 2008/11/20 10:55:45 UTC

WordDelimeterFilter and its Factory: access to charTypeTable

Hi Solr Community,

I was wondering if it is possible to access and modify the charTypeTable
of the WordDelimeterFilter. 

The use case is that I do not want to split on a '*' char. Which the
filter currently does. If I could modify the charTypeTable I could
change the behaviour of the filter. Or am I barking up the wrong tree
and should I use a different approach?

Thanks,

Jerven Bolleman



RE: WordDelimeterFilter and its Factory: access to charTypeTable

Posted by Jerven Bolleman <je...@isb-sib.ch>.
On Thu, 2008-11-20 at 07:30 -0800, Feak, Todd wrote:
> I've found that creating a custom filter and filter factory isn't too
> burdensome when the filter doesn't "quite" do what I need. You could
> grab the source and create your own version.
> 
I will have to do so anyway. As a test I used reflection to modify the
charTypeTable. And it works quite well, unfortunatly a different problem
that cropped up means that the WordDelimeterFilter as is is no longer
suitable for our use. So I will be writing a Filter from scratch. 

Thanks,

Jerven
> -Todd Feak
> 
> -----Original Message-----
> From: Jerven Bolleman [mailto:jerven.bolleman@isb-sib.ch] 
> Sent: Thursday, November 20, 2008 1:56 AM
> To: solr-user@lucene.apache.org
> Subject: WordDelimeterFilter and its Factory: access to charTypeTable
> 
> Hi Solr Community,
> 
> I was wondering if it is possible to access and modify the charTypeTable
> of the WordDelimeterFilter. 
> 
> The use case is that I do not want to split on a '*' char. Which the
> filter currently does. If I could modify the charTypeTable I could
> change the behaviour of the filter. Or am I barking up the wrong tree
> and should I use a different approach?
> 
> Thanks,
> 
> Jerven Bolleman
> 
> 
> 


RE: WordDelimeterFilter and its Factory: access to charTypeTable

Posted by "Feak, Todd" <To...@smss.sony.com>.
I've found that creating a custom filter and filter factory isn't too
burdensome when the filter doesn't "quite" do what I need. You could
grab the source and create your own version.

-Todd Feak

-----Original Message-----
From: Jerven Bolleman [mailto:jerven.bolleman@isb-sib.ch] 
Sent: Thursday, November 20, 2008 1:56 AM
To: solr-user@lucene.apache.org
Subject: WordDelimeterFilter and its Factory: access to charTypeTable

Hi Solr Community,

I was wondering if it is possible to access and modify the charTypeTable
of the WordDelimeterFilter. 

The use case is that I do not want to split on a '*' char. Which the
filter currently does. If I could modify the charTypeTable I could
change the behaviour of the filter. Or am I barking up the wrong tree
and should I use a different approach?

Thanks,

Jerven Bolleman




Re: WordDelimeterFilter and its Factory: access to charTypeTable

Posted by Chris Hostetter <ho...@fucit.org>.
: I was wondering if it is possible to access and modify the charTypeTable
: of the WordDelimeterFilter. 

FWIW: WordDelimeterFilter has a static package protected 
defaultWordDelimTable but there is no need to modify it -- you can 
pass your own charTypeTable directly to the WordDelimeterFilter 
constructor ... this might mean writing your own Factory, but you don't 
need to muck with the guts of WDF itself.


-Hoss