Unable to match strings with Underscore / . etc...

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Unable to match strings with Underscore / . etc...

DURGA DEEP
 HI folks,

         We are facing this problem with able to find the following strings.

For Example:

a.b.c
a_b_c

Are we doing some thing wrong ?. Seems like the ( . / Period Character )  (
_ / Underscore Character ) are being tossed away.

And if we are trying to search for a.b.c we are unable to find it. But we
are able to find abc.

Since we have lots of IP Addresses in our work, this is a severe limitation.
Can some one help ?


Thanks Much
_Durga
Reply | Threaded
Open this post in threaded view
|

Re: Unable to match strings with Underscore / . etc...

Erick Erickson
You have to look at your analyzers. StandardAnalyzer
tries to respect things like e-mail addresses. Various
other analyzers you could use do things like break
on punctuation.

I'd suggest you get a copy of Luke and examine what
your index actually holds and you can look at the
parsed form of a query. Note that in Luke, you can
choose various analyzers for these steps.

So, you'll probably have to write your own Analyzer
(see Lucene In Action for examples).

And be sure that you use the same analyzer for
both indexing and querying unless and until you
really understand them.

Finally, show us your indexing and query code
if you want more suggestions, but please pare
out any unnecessary parts.....

Best
Erick

On Jan 17, 2008 1:59 PM, DURGA DEEP <[hidden email]> wrote:

>  HI folks,
>
>         We are facing this problem with able to find the following
> strings.
>
> For Example:
>
> a.b.c
> a_b_c
>
> Are we doing some thing wrong ?. Seems like the ( . / Period Character )
>  (
> _ / Underscore Character ) are being tossed away.
>
> And if we are trying to search for a.b.c we are unable to find it. But we
> are able to find abc.
>
> Since we have lots of IP Addresses in our work, this is a severe
> limitation.
> Can some one help ?
>
>
> Thanks Much
> _Durga
>