lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeroen Lauwers <Jeroen.Lauw...@CTLO.NET>
Subject RE: Advanced NearSpanQuery
Date Mon, 18 Jul 2011 14:24:10 GMT
For your information:
After a closer inspection, I found a couple of errors in my code. I've fixed most of them
so if anyone is interested, just let me know.

Jeroen

-----Original Message-----
From: Jeroen Lauwers [mailto:Jeroen.Lauwers@CTLO.NET] 
Sent: vrijdag 15 juli 2011 17:08
To: java-user@lucene.apache.org
Subject: RE: Advanced NearSpanQuery

Hi Mike and Simon,

Thanks again for your help, but I've created my own solution by writing a custom span query.
Now, I can perform searches where some of the terms that I supply in the query can be missing
from the result.
This way it allows for a slop at the query side AND on the result side.

In case you are interested, here's the code: It's C# and not Java, I know, but hey, look at
it as pseudo-code.

-----Original Message-----
From: Mike Sokolov [mailto:sokolov@ifactory.com]
Sent: woensdag 13 juli 2011 23:02
To: java-user@lucene.apache.org
Cc: Simon Willnauer
Subject: Re: Advanced NearSpanQuery

Sorry for the misdirection ...

On 07/13/2011 11:37 AM, Simon Willnauer wrote:
> 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.Lauwers@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:sokolov@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-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message