[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Koha-zebra] Scan problem.
From: |
Mike Taylor |
Subject: |
Re: [Koha-zebra] Scan problem. |
Date: |
Mon, 29 Oct 2007 15:47:50 +0000 |
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.
> >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);
> 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.
> > > My last question would be : What if I want to get all the distinct
> > > values stored for authors. Can I get them via a scan ?
> > > something like scan_pqf("@attr 1=1 @attr 8=1 @attr 6=3") which would
> > > return all authors, complete subfields, for resultset 1, assuming names
> > > and surnames would be in the same subfield.
> >
> > That looks about right. Adam can comment on this from a more informed
> > perspective than I can.
> >
> This query was wrong because no search parameter. I corrected it.
And is it working?
_/|_ ___________________________________________________________________
/o ) \/ Mike Taylor <address@hidden> http://www.miketaylor.org.uk
)_v__/\ "Historically, Taunton is part of Minehead already" -- Monty
Python's Flying Circus.