1) search the list archives for: sentence paragraph and you'll find some discussions on generating position gaps in your analyzer to help esure that sloppy phrase queries are confined to a single sentence, or paragraph, or page. AND/OR using marker terms to denote the boundaries of various parts of documents for hte same purposes.
2) assuming you mean in your second question that you have a specific list of words you are interested in when you said "some other words" take a look at MultiPhraseQuery and/or SpanNearQuery containing SpanOrQueries. : Date: Wed, 04 Oct 2006 23:07:34 -0400 : From: Michael Imbeault <[EMAIL PROTECTED]> : Reply-To: java-user@lucene.apache.org : To: java-user@lucene.apache.org : Subject: Find if words are in the same phrase? : : Is it possible with Lucene to limit a proximity query to a phrase to : determine if two words are in the same phrase? Along the same train of : thoughts, is it possible to determine if two words in a same phrase are : separated by a word, or a list of words? Like for example Virus (some : other words) activate (some other words) cancer? : : Thanks, : : -- : Michael Imbeault : CHUL Research Center (CHUQ) : 2705 boul. Laurier : Ste-Foy, QC, Canada, G1V 4G2 : Tel: (418) 654-2705, Fax: (418) 654-2212 : : : --------------------------------------------------------------------- : To unsubscribe, e-mail: [EMAIL PROTECTED] : For additional commands, e-mail: [EMAIL PROTECTED] : -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]