[Xapian-discuss] NEAR/N is returning a different query

Jim jim at fayettedigital.com
Sat Oct 27 18:46:30 BST 2007


Ron Kass wrote:
> Hi
>
> If my memory serves me correctly, near without a range sets the range 
> to the number of terms in the query.
>
> What was the query you tried without the range?
>
>
> As for the 4/5 issue, maybe this is by design... NEAR/4 meaning 4 
> words in the middle, which is the same as 5 words difference.... 
> offered(@1) word(@2) word(@3) word(@4) word(@5) case(@6)... as you can 
> see offered and case have 4 words between them.. and therefore their 
> positions are 1 and 6 (5 apart). Maybe thats how it is designed..
>
> Haven't tried 'near' myself yet.
>
>
> Ron
>
>
> Jim wrote:
>
>> I did a query such as "offered NEAR/4 case" but the query that was 
>> returned is:
>>
>> Xapian::Query((offered:(pos=1) NEAR 5 case:(pos=2)))
>>
>> I also notices that a NEAR without the range came back with a NEAR 11 
>> in the query.
>>
>> Is that by design?
>>
>> Thanks,
>> Jim.
>>
>> _______________________________________________
>> Xapian-discuss mailing list
>> Xapian-discuss at lists.xapian.org
>> http://lists.xapian.org/mailman/listinfo/xapian-discuss
>
I didn't do a query without the range.  I was testing ranges and just 
happened to notice the phenomenon

Jim.



More information about the Xapian-discuss mailing list