[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-zebra] Scan problem.
From: |
Mike Taylor |
Subject: |
[Koha-zebra] Scan problem. |
Date: |
Mon, 29 Oct 2007 14:15:55 +0000 |
Henri-Damien LAURENT writes:
> Hi,
> I am exploring a bit further scanning feature.
> It is really great and the fact that we can use @attr 8 with resultset
> number would be of great value to display facets in my opinion.
> But I am facing some problems :
> ZOOM::Resultsets and ZOOM::Scansets are linked to connexions.
> If I want to use scan_pqf() with @attr 8= number, to limit facet to the
> previous resultset, I have to get or to guess resultset Number.
> But how can I since resultsets donot have any id property,
> and users are likely to refine or do multiple searchs ?
You can retrieve the result-set ID using:
$rs->option("resultSetId");
(Make sure you have an up-to-date YAZ for this to work.)
> One solution I see would be to create and destroy connections right
> before and right after each search. Would kohagang agree on that ?
I don't see that this is either necessary or sufficient.
> That way, ResultSet number would always be 1.
Not necessarily.
> But it seems to me that getting resultset number as a property of
> ZOOM::ResultSets OR making ScanSets depend not only on connections but
> also on ResultSets could be a solution and could be interesting.
Changing the model to make ScanSet dependent on ResultSet would have
dramatic consequences and would violate the ZOOM Abstract API. But I
guess that you don't need this if you can fetch resultSetId.
> Another question is :
> 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.
> Is there really no way to get More results ?
Well, sure: set "number" to a higher number.
> What If I wanted only the 10 most relevant results but not the 10
> first ? Would there be a solution ?
No, there is no relevance support in scan: it is a very literal-minded
browse of the index.
> 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.
> (But would work for Callnumbers, simple subjects, branches and
> Publihser names). Of course, we could get some by entering a
> one-letter word a b c d.... But if we could avoid...
Sorry, I don't understand that question.
_/|_ ___________________________________________________________________
/o ) \/ Mike Taylor <address@hidden> http://www.miketaylor.org.uk
)_v__/\ ... but Doctor, surely the odds against that happening are
astronomical!