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
SpanTermQuery[] phrase = new SpanTermQuery[phraseTerms.length]; for(int termCount=0; termCount<phraseTerms.length ;termCount++) { phrase[termCount] = new SpanTermQuery(new Term("contents", phraseTerm termCount])); } SpanQuery [] clauses = new SpanQuery[phraseTerms.length]; for(int count =0; count<phraseTerms.length ; count++) { clauses[count]=phrase[count]; } SpanNearQuery near = new SpanNearQuery(clauses, 0, true); Spans spans = near.getSpans(rd); Regards Vishal On 4/19/06, Daniel Naber <[EMAIL PROTECTED]> wrote: > On Mittwoch 19 April 2006 07:25, Vishal Bathija wrote: > > > Query= contents:"provides distribution" contents:"supports > > distribution" > > Why are there two spaces between those words? > > > I am not sure why it returns 0, when I have both phrases present in the > > docs. > > See > http://wiki.apache.org/jakarta-lucene/LuceneFAQ#head-3558e5121806fb4fce80fc022d889484a9248b71 > > Regards > Daniel > > -- > http://www.danielnaber.de > > --------------------------------------------------------------------- > 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]