Mailing List Archive

Lucene with Number+Text
Hi all;

I've problem searching for number in Lucene.
I'm using StandardAnalyzer for Index/Search.

In my document, I have a field contains text
"this is a test for lucene with number 1727a and 1992 and 3562"

- I was able to search for a 1992 or 3562.
- However, search return empty when I try to search for 1727 or 1727a. It
seems like it didn't index number and text when it's one word. Please help

Thanks
Tihonone



_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Lucene with Number+Text [ In reply to ]
> I've problem searching for number in Lucene.
> I'm using StandardAnalyzer for Index/Search.
>
> In my document, I have a field contains text
> "this is a test for lucene with number 1727a and 1992 and 3562"
>
> - I was able to search for a 1992 or 3562.
> - However, search return empty when I try to search for 1727 or 1727a. It
> seems like it didn't index number and text when it's one word. Please help

Are you sure this is using StandardAnalyzer on the latest
release (1.2 rc4)? If I index that string and search
for 1727a I get a hit.



--
Ian.

----------------------------------------------------------------------
Searchable personal storage and archiving from http://www.digimem.net/
Re: Lucene with Number+Text [ In reply to ]
Yep,

I used StandardAnalyzer for Index/Search on the latest release (1.2 rc4).

TihonOne



>From: Ian Lea <ian@digimem.net>
>To: Tihon One <tihonone@hotmail.com>
>CC: lucene-user@jakarta.apache.org
>Subject: Re: Lucene with Number+Text
>Date: Mon, 25 Mar 2002 15:03:39 +0000 (GMT)
>
> > I've problem searching for number in Lucene.
> > I'm using StandardAnalyzer for Index/Search.
> >
> > In my document, I have a field contains text
> > "this is a test for lucene with number 1727a and 1992 and 3562"
> >
> > - I was able to search for a 1992 or 3562.
> > - However, search return empty when I try to search for 1727 or 1727a.
>It
> > seems like it didn't index number and text when it's one word. Please
>help
>
>Are you sure this is using StandardAnalyzer on the latest
>release (1.2 rc4)? If I index that string and search
>for 1727a I get a hit.
>
>
>
>--
>Ian.
>
>----------------------------------------------------------------------
>Searchable personal storage and archiving from http://www.digimem.net/


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Lucene with Number+Text [ In reply to ]
I think I have seen a similar problem.

Are you guys using Keyword or Text fields?

sjb

On Mon, 25 Mar 2002, Tihon One wrote:

>Yep,
>
>I used StandardAnalyzer for Index/Search on the latest release (1.2 rc4).
>
>TihonOne
>
>
>
>>From: Ian Lea <ian@digimem.net>
>>To: Tihon One <tihonone@hotmail.com>
>>CC: lucene-user@jakarta.apache.org
>>Subject: Re: Lucene with Number+Text
>>Date: Mon, 25 Mar 2002 15:03:39 +0000 (GMT)
>>
>> > I've problem searching for number in Lucene.
>> > I'm using StandardAnalyzer for Index/Search.
>> >
>> > In my document, I have a field contains text
>> > "this is a test for lucene with number 1727a and 1992 and 3562"
>> >
>> > - I was able to search for a 1992 or 3562.
>> > - However, search return empty when I try to search for 1727 or 1727a.
>>It
>> > seems like it didn't index number and text when it's one word. Please
>>help
>>
>>Are you sure this is using StandardAnalyzer on the latest
>>release (1.2 rc4)? If I index that string and search
>>for 1727a I get a hit.
>>
>>
>>
>>--
>>Ian.
>>
>>----------------------------------------------------------------------
>>Searchable personal storage and archiving from http://www.digimem.net/
>
>
>_________________________________________________________________
>MSN Photos is the easiest way to share and print your photos:
>http://photos.msn.com/support/worldwide.aspx
>
>
>--
>To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Lucene with Number+Text [ In reply to ]
with standard analyzer , keywords are not tokenized therefore numbers are
not filtered and will hit on searches anything other fields which is
tokenized will skip numbers and tokenizing with the standard analyzer


warren


Please respond to "Lucene Users List" <lucene-user@jakarta.apache.org>


To: Lucene Users List <lucene-user@jakarta.apache.org>
cc:
Subject: Re: Lucene with Number+Text


I think I have seen a similar problem.

Are you guys using Keyword or Text fields?

sjb

On Mon, 25 Mar 2002, Tihon One wrote:

>Yep,
>
>I used StandardAnalyzer for Index/Search on the latest release (1.2 rc4).
>
>TihonOne
>
>
>
>>From: Ian Lea <ian@digimem.net>
>>To: Tihon One <tihonone@hotmail.com>
>>CC: lucene-user@jakarta.apache.org
>>Subject: Re: Lucene with Number+Text
>>Date: Mon, 25 Mar 2002 15:03:39 +0000 (GMT)
>>
>> > I've problem searching for number in Lucene.
>> > I'm using StandardAnalyzer for Index/Search.
>> >
>> > In my document, I have a field contains text
>> > "this is a test for lucene with number 1727a and 1992 and 3562"
>> >
>> > - I was able to search for a 1992 or 3562.
>> > - However, search return empty when I try to search for 1727 or
1727a.
>>It
>> > seems like it didn't index number and text when it's one word. Please

>>help
>>
>>Are you sure this is using StandardAnalyzer on the latest
>>release (1.2 rc4)? If I index that string and search
>>for 1727a I get a hit.
>>
>>
>>
>>--
>>Ian.
>>
>>----------------------------------------------------------------------
>>Searchable personal storage and archiving from http://www.digimem.net/
>
>
>_________________________________________________________________
>MSN Photos is the easiest way to share and print your photos:
>http://photos.msn.com/support/worldwide.aspx
>
>
>--
>To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Lucene with Number+Text [ In reply to ]
Good thinking. In my test, using a Text field, searches
for 1727a and 1727* both return a hit but if switch to
Keyword they don't.


--
Ian.

> sjb@careersite.com (Shannon Booher) wrote
>
> I think I have seen a similar problem.
>
> Are you guys using Keyword or Text fields?

----------------------------------------------------------------------
Searchable personal storage and archiving from http://www.digimem.net/
Re: Lucene with Number+Text [ In reply to ]
That's exactly what I've seen. And that doesn't make sense right? Since
a Keyword is not tokenized, shouldn't it produce a hit?

sjb

On Mon, 25 Mar 2002, Ian Lea wrote:

>Good thinking. In my test, using a Text field, searches
>for 1727a and 1727* both return a hit but if switch to
>Keyword they don't.
>
>
>--
>Ian.
>
>> sjb@careersite.com (Shannon Booher) wrote
>>
>> I think I have seen a similar problem.
>>
>> Are you guys using Keyword or Text fields?
>
>----------------------------------------------------------------------
>Searchable personal storage and archiving from http://www.digimem.net/
>
>


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Lucene with Number+Text [ In reply to ]
hello,

The solution we adopted is to use WhiteSpaceAnalyser.
If you print the result of a query after parsing it (with parse method)
the tokenizers used delete the numbers from the query.
But WhiteSpaceAnalyser only tokenizes based on ... spaces, so we can
search on numbers values ....

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
RE: Lucene with Number+Text [ In reply to ]
Hi,
I am indexing as text field. Search for 05qzFebqz01, 05q* do not work. I am
using a StandardAnalyzer. Search for 05* works.
Searches on another word cq6r work fine.
Any idea why this is happening?
Thanks!
Aruna.

-----Original Message-----
From: Ian Lea [mailto:ian@digimem.net]
Sent: Monday, March 25, 2002 3:56 PM
To: Lucene Users List
Subject: Re: Lucene with Number+Text


Good thinking. In my test, using a Text field, searches
for 1727a and 1727* both return a hit but if switch to
Keyword they don't.


--
Ian.

> sjb@careersite.com (Shannon Booher) wrote
>
> I think I have seen a similar problem.
>
> Are you guys using Keyword or Text fields?

----------------------------------------------------------------------
Searchable personal storage and archiving from http://www.digimem.net/


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
RE: Lucene with Number+Text [ In reply to ]
> I am indexing as text field. Search for 05qzFebqz01, 05q* do not work. I am
> using a StandardAnalyzer. Search for 05* works.
> Searches on another word cq6r work fine.
> Any idea why this is happening?

Works just fine for me. Test program attached.


--
Ian.

----------------------------------------------------------------------
Searchable personal storage and archiving from http://www.digimem.net/