[KinoSearch] I'm getting fewer than expected results when supplying multiple fields
Adam
adamfletcher.work at googlemail.com
Fri Nov 16 06:22:46 PST 2007
On (15/11/07 15:52), Marvin Humphrey wrote:
> On Nov 10, 2007, at 3:23 AM, Adam . wrote:
>
> >I'll strip out the irrelevent code/data and send my data and test case
> >to you off-list once I've got a refined example.
>
> I've isolated the problem and can provide a workaround. It turns out
> not to be ANDScorer after all. ANDScorer has held up well under more
> thorough testing.
>
> Instead, the problem manifests during SegPList_Skip_To. It either
> occurs because of something awry in the SegPList_skip_to function
> itself, or because either PostingsWriter or LexWriter isn't writing
> skip information correctly.
>
> SegPList_Skip_To is only an optimization though. If we disable it,
> then SegPostingList inherits the definitive method from Scorer...
>
> bool_t
> Scorer_skip_to(Scorer *self, u32_t target)
> {
> do {
> if ( !Scorer_Next(self) )
> return false;
> } while ( target > Scorer_Doc(self) );
>
> return true;
> }
>
> ... which produces the correct results.
>
> To implement the workaround, comment out the declaration of Skip_To
> in SegPostingList.h...
>
> /*
> chy_bool_t
> kino_SegPList_skip_to(kino_SegPostingList *self, chy_u32_t target);
> KINO_METHOD("Kino_SegPList_Skip_To");
> */
>
> ... then run this sequence:
>
> ./Build distclean
> perl Build.PL
> ./Build [test, install, code, whatever]
>
> Note: the distclean step is *essential*.
I have commented out the above code, but got this fatal error when doing the
./Build install step :
In file included from c_src/KinoSearch/Index/SegPostingList.c:5:
c_src/r/KinoSearch/Index/SegPostingList.r:200: error: 'kino_SegPList_skip_to' undeclared here (not in a function)
error building c_src/KinoSearch/Index/SegPostingList.o from 'c_src/KinoSearch/Index/SegPostingList.c' at /usr/local/share/perl/5.8.8/ExtUtils/CBuilder/Base.pm line 108.
I commented out line 200 of SegPostingList.r :
(kino_PList_skip_to_t)kino_SegPList_skip_to,
and ran the above 3 build steps again. This time it completed successfully.
I rebuilt my index again which went fine, but when I try my search
script, I get the following error :
Can't locate object method "collect" via package "KinoSearch::Util::VirtualTable" at
/usr/local/lib/perl/5.8.8/KinoSearch/Searcher.pm line 123.
Can you advise?
> The investigation of this bug has produced some happy side effects.
A beneficial bug? I must remember to use that spin at work. :-)
Thanks,
Adam
_______________________________________________
KinoSearch mailing list
KinoSearch at rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch
More information about the kinosearch
mailing list