You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Hetan Shah <He...@Sun.COM> on 2005/02/03 23:18:40 UTC

Numbers in the Query String

Hello,

How can one search for a document based on the query which has numbers 
in the query srting.

e.g. query = Java 2 Platform J2EE

What do I need to do so that the numbers do not get neglected.

I am using StandardAnalyzer to index the pages and using StopAnalyzer to 
search the documents. Would the use of two different analyzers cause any 
trouble for the results?

Thanks.
-H


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: Numbers in the Query String

Posted by Andrzej Bialecki <ab...@getopt.org>.
Hetan Shah wrote:
> Hello,
> 
> How can one search for a document based on the query which has numbers 
> in the query srting.
> 
> e.g. query = Java 2 Platform J2EE
> 
> What do I need to do so that the numbers do not get neglected.
> 
> I am using StandardAnalyzer to index the pages and using StopAnalyzer to 
> search the documents. Would the use of two different analyzers cause any 
> trouble for the results?

Yes. StopAnalyzer eats all numbers for breakfast. ;-) You need to use 
another analyzer, one that doesn't discard numbers.

-- 
Best regards,
Andrzej Bialecki
  ___. ___ ___ ___ _ _   __________________________________
[__ || __|__/|__||\/|  Information Retrieval, Semantic Web
___|||__||  \|  ||  |  Embedded Unix, System Integration
http://www.sigram.com  Contact: info at sigram dot com


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: Numbers in the Query String

Posted by 张瑾 <pr...@gmail.com>.
I agree their viewpoint!


On Thu, 3 Feb 2005 14:29:13 -0800 (PST), Otis Gospodnetic
<ot...@yahoo.com> wrote:
> Using different analyzers for indexing and searching is not
> recommended.
> Your numbers are not even in the index because you are using
> StandardAnalyzer.  Use Luke to look at your index.
> 
> Otis
> 
> 
> --- Hetan Shah <He...@Sun.COM> wrote:
> 
> > Hello,
> >
> > How can one search for a document based on the query which has
> > numbers
> > in the query srting.
> >
> > e.g. query = Java 2 Platform J2EE
> >
> > What do I need to do so that the numbers do not get neglected.
> >
> > I am using StandardAnalyzer to index the pages and using StopAnalyzer
> > to
> > search the documents. Would the use of two different analyzers cause
> > any
> > trouble for the results?
> >
> > Thanks.
> > -H
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> 


-- 
愿你快乐每一天

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: Numbers in the Query String

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Using different analyzers for indexing and searching is not
recommended.
Your numbers are not even in the index because you are using
StandardAnalyzer.  Use Luke to look at your index.

Otis


--- Hetan Shah <He...@Sun.COM> wrote:

> Hello,
> 
> How can one search for a document based on the query which has
> numbers 
> in the query srting.
> 
> e.g. query = Java 2 Platform J2EE
> 
> What do I need to do so that the numbers do not get neglected.
> 
> I am using StandardAnalyzer to index the pages and using StopAnalyzer
> to 
> search the documents. Would the use of two different analyzers cause
> any 
> trouble for the results?
> 
> Thanks.
> -H
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org