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: Transform a sentences in Terms
Date Thu, 17 Jun 2004 15:36:38 GMT
On Jun 17, 2004, at 11:25 AM, Daniel de Souza Teixeira wrote:
> Hi folks!
>
> I needed something like this...
> I have a sentence: "I love my dog".
> Someone has a code that I can transform this sentence in Terms to add 
> in a
> PhraseQuery ?
>
> PhraseQuery pq = new PhraseQuery();
>
> while ( <sentence doesn't ended> )
>    query.add(new Term("field", text));

Adapt from AnalysisDemo here: 
http://today.java.net/pub/a/today/2003/07/30/LuceneIntro.html

	Erik


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


Mime
View raw message