lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "deb.lucene" <deb.luc...@gmail.com>
Subject Re: multiple phrase search for topic
Date Mon, 31 Oct 2011 14:51:49 GMT
thanks Ian for your response. This is a one-time offline program so am not
bothered about the performance (i.e. speed etc.).

one more question, there are some situations where I need to run a AND
clause (i.e. more than one phrase, such as "Apple" AND "Steve Jobs"). My
approach was something like :-

**********************
String searchString = "(" + phrase1 + ")" + " AND " + "(" + phrase2 + ")" ;
QueryParser queryParser = new QueryParser(Version.LUCENE_33,"content", new
StandardAnalyzer(Version.LUCENE_33));

Query query = queryParser.parse(searchString);
bQuery.add(query,BooleanClause.Occur.SHOULD); 

**********************
thanks for the carrot2 pointer.

-d




--
View this message in context: http://lucene.472066.n3.nabble.com/multiple-phrase-search-for-topic-tp3461423p3468005.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
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