I don't think this is possible with spans today. Once https://issues.apache.org/jira/browse/LUCENE-2878 is due this should be possible with a boolean query I think.
to work around this you need to write a SpanOR query with a minShouldMatch functionality though. simon On Wed, Jul 13, 2011 at 5:09 PM, Jeroen Lauwers <jeroen.lauw...@ctlo.net> wrote: > Hi Mike, > > Thanks for your quick reply, but do not seem to find any documentation on > "DisjunctionSumQuery" and I'm not familiar with that concept. > > Could you point me in the right direction? > > Jeroen > > -----Original Message----- > From: Mike Sokolov [mailto:soko...@ifactory.com] > Sent: woensdag 13 juli 2011 15:23 > To: java-user@lucene.apache.org > Cc: Jeroen Lauwers > Subject: Re: Advanced NearSpanQuery > > Can you wrap a SpanNearQuery around an DisjunctionSumQuery with > minNrShouldMatch=8? > > -Mike > > On 07/13/2011 08:53 AM, Jeroen Lauwers wrote: >> Hi, >> >> I was wondering if anyone could help me on this: >> >> I want to search for: >> >> 1. a set of words (eg. 10) >> >> 2. only a couple of words may come in between (eg. 3) in the result >> document >> >> 3. of the supplied set of (10) words, at least 8 must be present (or >> in other words: 2 of the supplied words can be missing) >> >> I use the SpanNearQuery for (1.) and (2.), but it is the third part that's >> lacking. >> >> Any ideas? >> >> Jeroen >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org