: PhraseQuery pq_query = new PhraseQuery(); : pq_query.add( new Term( "body", "\"circus parade\"" ) ); : <BooleanQuery>.add( pq_query, true, false);
the terms you add to a phrase query need to be exactly equal to the individual terms that your analyzer would have generated when indexingthe documents you now want to match. in your case, it looks like you are using StandardAnalyzer -- which never generates a term with a space in it. try this.... PhraseQuery pq_query = new PhraseQuery(); pq_query.add(new Term("body", "circus")); pq_query.add(new Term("body", "parade")); : bq_query.add((PhraseQuery)QueryParser.parse( "\"circus parade\"", "body", new StandardAnalyzer() ), true, false) ; ...off the top of my head, that seems like it should work. have you looked at the toString on the resulting query object to see what it's structure is? Compare it with the toString of a query built hte way i describe above and see if anything is different. -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]