Re: Filter to cut out all zeors?

2010-03-10 Thread Sebastian F
yes, thank you. That was exactly what I was looking for! Great help!





From: Ahmet Arslan iori...@yahoo.com
To: solr-user@lucene.apache.org
Sent: Tue, March 9, 2010 7:26:46 PM
Subject: Re: Filter to cut out all zeors?

 I'm trying to figure out the best way to cut out all zeros
 of an input string like 01.10. or 022.300...
 Is there such a filter in Solr or anything similar that I
 can adapt to do the task?

With solr.MappingCharFilterFactory[1] you can replace all zeros with  before 
tokenizer. 

charFilter class=solr.MappingCharFilterFactory mapping=mapping.txt/

SolrHome/conf/mapping.txt file will contain this line:

0 = 

So that 01.10. will become 1.1. and  022.300 will become 22.3 Is that 
you want?

[1]http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.MappingCharFilterFactory
 


  

Re: Filter to cut out all zeors?

2010-03-10 Thread Norberto Meijome
won't this replace *all* 0s ? ie, 1024 will become 124 ?
_
{Beto|Norberto|Numard} Meijome

The only people that never change are the stupid and the dead
 Jorge Luis Borges.

I speak for myself, not my employer. Contents may be hot. Slippery when wet.
Reading disclaimers makes you go blind. Writing them is worse. You have been
Warned.


On 11 March 2010 03:24, Sebastian F qba...@yahoo.com wrote:

 yes, thank you. That was exactly what I was looking for! Great help!




 
 From: Ahmet Arslan iori...@yahoo.com
 To: solr-user@lucene.apache.org
 Sent: Tue, March 9, 2010 7:26:46 PM
 Subject: Re: Filter to cut out all zeors?

  I'm trying to figure out the best way to cut out all zeros
  of an input string like 01.10. or 022.300...
  Is there such a filter in Solr or anything similar that I
  can adapt to do the task?

 With solr.MappingCharFilterFactory[1] you can replace all zeros with 
 before tokenizer.

 charFilter class=solr.MappingCharFilterFactory mapping=mapping.txt/

 SolrHome/conf/mapping.txt file will contain this line:

 0 = 

 So that 01.10. will become 1.1. and  022.300 will become 22.3 Is
 that you want?

 [1]
 http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.MappingCharFilterFactory






Filter to cut out all zeors?

2010-03-09 Thread Sebastian F
Hey there,

I'm trying to figure out the best way to cut out all zeros of an input string 
like 01.10. or 022.300...
Is there such a filter in Solr or anything similar that I can adapt to do the 
task?

Thanks for any help



  

Re: Filter to cut out all zeors?

2010-03-09 Thread Ahmet Arslan
 I'm trying to figure out the best way to cut out all zeros
 of an input string like 01.10. or 022.300...
 Is there such a filter in Solr or anything similar that I
 can adapt to do the task?

With solr.MappingCharFilterFactory[1] you can replace all zeros with  before 
tokenizer. 

charFilter class=solr.MappingCharFilterFactory mapping=mapping.txt/

SolrHome/conf/mapping.txt file will contain this line:

0 = 

So that 01.10. will become 1.1. and  022.300 will become 22.3 Is that 
you want?

[1]http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.MappingCharFilterFactory