lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Hall <mh...@informatics.jax.org>
Subject Re: How Can I make an analyzer that ignore the numbers o the texts ???
Date Wed, 08 Apr 2009 17:52:29 GMT
You can define your own STOP_LIST and pass it in as a constructor to 
most analyzers.

For example from the Lucene Javadocs:


      StandardAnalyzer

public *StandardAnalyzer*(String <http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html>[]
stopWords)

Builds an analyzer with the given stop words.

The only thing that you need to be careful of is to make sure that the 
analyzer isn't doing some sort of conversion of the tokens before the 
stoplist is checked, but otherwise that should work out just fine.

Matt

Ariel wrote:
> Hi everybody:
>
> I would want to know how Can I make an analyzer that ignore the numbers o
> the texts like the stop words are ignored ??? For example that the terms :
> 3.8, 100, 4.15, 4,33 don't be added to the index.
> How can I do that ???
>
> Regards
> Ariel
>
>   


-- 
Matthew Hall
Software Engineer
Mouse Genome Informatics
mhall@informatics.jax.org
(207) 288-6012



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message