lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: queryparser
Date Thu, 28 Jun 2007 18:40:50 GMT

On Jun 28, 2007, at 1:29 PM, pratik shinghal wrote:

> i m using lucene(org.apache.lucene) and i want the java code for  
> parsing
> single character string..
>
> my code is :
>
> QueryParser qp  = new QueryParser("",analyser);
> String  str = " track 9";
> Query que =  qp.parse(str);
> System.out.println(que);
>
> and i want the answer as  :    track ,  9
>
>
> but i m getting only "track"  and not getting  "9" .
> so tell me which analyser & queryparser i should use and kindly  
> give me the
> java code for the same , as i m new to
> lucene.

The Analysis section here should help:

	<http://today.java.net/pub/a/today/2003/07/30/LuceneIntro.html>

(note the code in that article is Lucene 1.4-1.9 compatible, some  
slight tweaks are needed to make it 2.x compliant)

	Erik


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


Mime
View raw message