lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erdinc Yilmazel <erdincyilma...@gmail.com>
Subject Re: LegthFilter
Date Mon, 28 Sep 2009 23:40:06 GMT
Thanks Simon, It turned out to be a simple mistake that I made... I was
creating an index with the LengthFilter applied, however reading from
another index directory because of a configuration error on my ide. (The
working directory paths were wrong in Run configs...)
Sorry about wasting your time.

Thanks again,

Erdinc


On Mon, Sep 28, 2009 at 8:18 PM, Simon Willnauer <
simon.willnauer@googlemail.com> wrote:

> I don't see a reason why this shoul not work though. are you sure you
> have indexed all fields with this analyzer or do you iterate over
> terms of another field not being analyzed with the an analyzer using
> the length filter?!
>
> simon
>
> On Mon, Sep 28, 2009 at 1:06 PM, Erdinc Yilmazel
> <erdincyilmazel@gmail.com> wrote:
> > Sorry if this is a stupid question. I want my index to contain terms that
> > are at least 4 characters long. So I wrote a simple analyzer and  applied
> > the LengthFilter. When I open the index and get a TermEnum from the
> > directory, I can still see terms that are less than 4 characters... What
> do
> > you think is wrong? I am using lucene 2.9.0.
> > The analyzer code:
> >
> >   @Override
> >   public TokenStream tokenStream(String fieldName, Reader reader) {
> >      StandardTokenizer tokenStream = new StandardTokenizer(reader, true);
> >      TokenStream result = new StandardFilter(tokenStream);
> >      result = new LengthFilter(result, 4, 20);
> >      result = new LowerCaseFilter(result);
> >      result = new StopFilter(false, result, stopSet);
> >      return result;
> >   }
> >
> > Erdinc
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message