[Koha-zebra] Scan problem.
Adam Dickmeiss
adam at indexdata.dk
Fri Nov 2 17:56:48 CET 2007
Henri-Damien LAURENT wrote:
> Mike Taylor a écrit :
>> Henri-Damien LAURENT writes:
>> > the latest question I found a workaround :
>> > my $scan= $conn->scan_pqf('@attr 1=21 @attr 6=3 @attr 5=102 @attr 8=1
>> > "[A-z0-9]"');
>> > That way, I can get all the publishers.
>>
>> Hmm. But if you start your scan from the just "a" that will yield the
>> same start-point. Remember that the term in a scan "query" is not
>> searched for, just used as a start-point within the list of all
>> terms. If you want to start from the very beginning, you should
>> probably use the empty search-term "", which sorts to the start.
>>
>> > This query was wrong because no search parameter. I corrected it.
>>
>> And is it working?
>>
> empty search term is not working.
> What works best is "0".
>
>> > >From perldoc ZOOM :
>> > number [default: 10]
>> > Indicates how many terms should be returned in the ScanSet.
>> > The number actually returned may be less, if the start-point is near the
>> > end of the index, but will not be greater.
>> > I tried to set number to 100 this way
>> > $conn->option(preferredRecordSyntax => "usmarc",number=>100);
>> >
>> > And got only 10 results.
>> > Am I doing wrong ?
>>
>> For some reason, you can't set multiple options in a single call like
>> this: the second and subsequent are ignored. Use:
>> $conn->option(preferredRecordSyntax => "usmarc");
>> $conn->option(number=>100);
>>
> Thanks for this very valuable information.
> It works now.
>> > Is there a way to order "scanned" term on hit count ?
>>
>> Not that I know of. If there is a way, it's Zebra-specific, and Adam
>> will be the one who knows about it.
>>
> Let us wait his advice on that then.
>
The order of scan terms are ordered in lex. order. Not by frequency. We
are, however, working on this . The solution will still be "scan" but an
attribute will signal "order by frequency". AKA faceted search.
/ Adam
More information about the Koha-zebra
mailing list