How do I get the spans (getSpans()) if I use the SpanNearQuery as a clause (subquery) in a BooleanQuery
I currently have SpanQuery [] clauses1 = new SpanQuery[phraseTerms1.length]; for(int count =0; count< phraseTerms1.length; count++) { clauses1[count]=phrase1[count]; } SpanQuery [] clauses2 = new SpanQuery[phraseTerms2.length]; for(int count =0; count< phraseTerms2.length; count++) { clauses2[count]=phrase2[count]; } SpanNearQuery near1 = new SpanNearQuery(clauses1, 0, true); SpanNearQuery near2 = new SpanNearQuery(clauses2, 0, true); I need the spans of either clause1 or clause2. Vishal On 4/22/06, Paul Elschot <[EMAIL PROTECTED]> wrote: > On Friday 21 April 2006 21:11, Vishal Bathija wrote: > > Hi, > > I am trying to get the frequency of a phrase using the SpanNearQuery. > > How can I use SpanNearQuery for boolean queries. The code I have is > > for a single query. How can I extend this for multiple queries > > You can use SpanNearQuery as a clause (subquery) in a BooleanQuery > or in a SpanOrQuery. > See BooleanQuery.add() and the constructor of SpanOrQuery. > > Regards, > Paul Elschot > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Vishal Bathija Graduate Student Department of Computer Science & Systems Analysis Miami University Oxford,Ohio Phone: (513)-461-9239 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]