You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lucenenet.apache.org by João Carlos Clementoni Silva <jo...@m2sys.com.br> on 2012/12/20 17:54:50 UTC

Indexing with mask and searching without

Hello.
I'm using Lucene.Net 3.0.3 and I've got the following problem:
I'm indexing a text in a field like this: "Your number is 123.456.789-01".
I want to search for "12345678901" or "123456*" but it isn't working. 
Searching by "123.456*" works.
I'm using StandardAnalyzer.
What shall I do?
Thank you very much.

João


Re: Indexing with mask and searching without

Posted by João Carlos Clementoni Silva <jo...@m2sys.com.br>.
Ok. Thank you very much.

Em 20/12/2012 15:46, Alberto León escreveu:
> I suggets to use regex to format the number without punctuation in formated
> phone number.
> Later you pass the formated number to the query to search.
>
>
> 2012/12/20 Prescott Nasser <ge...@hotmail.com>
>
>> You probably need to write your own analyzer to handle the special case of
>> punctuation to suit your need
>>
>>> Date: Thu, 20 Dec 2012 14:54:50 -0200
>>> From: joao.silva@m2sys.com.br
>>> To: user@lucenenet.apache.org
>>> Subject: Indexing with mask and searching without
>>>
>>> Hello.
>>> I'm using Lucene.Net 3.0.3 and I've got the following problem:
>>> I'm indexing a text in a field like this: "Your number is 123.456.789-01
>> ".
>>> I want to search for "12345678901" or "123456*" but it isn't working.
>>> Searching by "123.456*" works.
>>> I'm using StandardAnalyzer.
>>> What shall I do?
>>> Thank you very much.
>>>
>>> João
>>>
>

-- 
Atenciosamente,

( ) Confidencial - (X) Interna - ( ) Pública




Re: Indexing with mask and searching without

Posted by Alberto León <le...@gmail.com>.
I suggets to use regex to format the number without punctuation in formated
phone number.
Later you pass the formated number to the query to search.


2012/12/20 Prescott Nasser <ge...@hotmail.com>

> You probably need to write your own analyzer to handle the special case of
> punctuation to suit your need
>
> > Date: Thu, 20 Dec 2012 14:54:50 -0200
> > From: joao.silva@m2sys.com.br
> > To: user@lucenenet.apache.org
> > Subject: Indexing with mask and searching without
> >
> > Hello.
> > I'm using Lucene.Net 3.0.3 and I've got the following problem:
> > I'm indexing a text in a field like this: "Your number is 123.456.789-01
> ".
> > I want to search for "12345678901" or "123456*" but it isn't working.
> > Searching by "123.456*" works.
> > I'm using StandardAnalyzer.
> > What shall I do?
> > Thank you very much.
> >
> > João
> >
>
>



-- 

http://stackoverflow.com/users/690958/alberto-leon

RE: Indexing with mask and searching without

Posted by Prescott Nasser <ge...@hotmail.com>.
You probably need to write your own analyzer to handle the special case of punctuation to suit your need

> Date: Thu, 20 Dec 2012 14:54:50 -0200
> From: joao.silva@m2sys.com.br
> To: user@lucenenet.apache.org
> Subject: Indexing with mask and searching without
> 
> Hello.
> I'm using Lucene.Net 3.0.3 and I've got the following problem:
> I'm indexing a text in a field like this: "Your number is 123.456.789-01".
> I want to search for "12345678901" or "123456*" but it isn't working. 
> Searching by "123.456*" works.
> I'm using StandardAnalyzer.
> What shall I do?
> Thank you very much.
> 
> João
>