lucene-lucene-net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Floyd Wu <floyd...@gmail.com>
Subject Re: Question about StandardAnalyzer.cs
Date Wed, 04 Mar 2009 09:50:46 GMT
But the current situation is: I can't search any result with "Z123456" when
I type "Z123456" or "z123456".

I'm using StandardAnalyzer and by using luke, the value indexed is
"Z123456".
How can I fix this problem?



2009/3/4 Jokin Cuadrado <jokin.c@gmail.com>

> the rationale behind using the lowercase filter, is that it would mach when
> you search both of Z123456 and z132456, so the searchs are case
> insensitive,
> however, as with any filter, you must use the same analyzer when indexing
> your documents, Are you doing that?
>
> On Wed, Mar 4, 2009 at 9:31 AM, Floyd Wu <floyd.wu@gmail.com> wrote:
>
> > Hi all,
> > My problem is I have a field and the field is set to be  Indexed &
> Stored.
> > The index value is Z123456.
> > But when I using StandardAnalyzer to search this field, it seems  that
> > StandarAnalyzer will transaform my query text "Z123456" to "z123456".
> After
> > walk through source code, I found following lines:
> >  public override TokenStream TokenStream(System.String fieldName,
> > System.IO.TextReader reader)
> >  {
> >   StandardTokenizer tokenStream = new StandardTokenizer(reader,
> > replaceInvalidAcronym);
> >   tokenStream.SetMaxTokenLength(maxTokenLength);
> >   TokenStream result = new StandardFilter(tokenStream);
> >   result = new LowerCaseFilter(result);
> >   result = new StopFilter(result, stopSet);
> >   return result;
> >  }
> >
> > Why using LoweCasefilter() here? If I comment out this line, will I have
> > any
> > potential problems?
> > I think my "Z123456" to "z123456" is transformed by this filter.
> >
>
>
>
> --
> Jokin
> Sent from: Sant cugat del valles  Spain.
>

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