X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=lib%2FZOOM.pod;h=00e5acaa4150b261171ecdf6a6b7ea19d58f1d25;hb=d1da15da71f65463e9edf7d101dd494d954e8bf7;hp=b626bf666d9b5f27082e1e2871bed87761ef70c2;hpb=c0ccfab6a11c696d81eb60bdeda710c223679d0c;p=ZOOM-Perl-moved-to-github.git diff --git a/lib/ZOOM.pod b/lib/ZOOM.pod index b626bf6..00e5aca 100644 --- a/lib/ZOOM.pod +++ b/lib/ZOOM.pod @@ -1,4 +1,4 @@ -# $Id: ZOOM.pod,v 1.12 2005-11-26 16:59:53 mike Exp $ +# $Id: ZOOM.pod,v 1.15 2005-12-13 12:32:15 mike Exp $ use strict; use warnings; @@ -247,27 +247,9 @@ Objects of the Connection, ResultSet, ScanSet and Package classes carry with them a set of named options which affect their behaviour in certain ways. See the ZOOM-C options documentation for details: -=over 4 - -=item * - Connection options are listed at http://indexdata.com/yaz/doc/zoom.tkl#zoom.connections -=item * - -ScanSet options are listed at -http://indexdata.com/yaz/doc/zoom.scan.tkl -I<### move this obvservation down to the appropriate place> - -=item * - -Package options are listed at -http://indexdata.com/yaz/doc/zoom.ext.html -I<### move this obvservation down to the appropriate place> - -=back - These options are set and fetched using the C method, which may be called with either one or two arguments. In the two-argument form, the option named by the first argument is set to the value of @@ -424,7 +406,7 @@ http://zoom.z3950.org/api/zoom-current.html#3.4 =head4 option() - $conn->option(elementSetName => "f"); + $rs->option(elementSetName => "f"); Allows options to be set into, and read from a ResultSet, just like the Connection class's C method. There is no @@ -439,7 +421,7 @@ http://indexdata.com/yaz/doc/zoom.resultsets.tkl Returns the number of records in the result set. -=head4 record(), record_immediate() +=head4 record() / record_immediate() $rec = $rs->record(0); $rec2 = $rs->record_immediate(0); @@ -489,7 +471,7 @@ efficiency gain to be had by passing 0.) Once the records have been retrieved from the server (i.e. C has completed without throwing an exception), they can be fetched much more efficiently using C - or -C, which is then guaranteed to succeed. =head4 cache_reset() @@ -726,25 +708,60 @@ http://zoom.z3950.org/api/zoom-current.html#3.6 print "Found ", $ss->size(), " terms\n"; -Returns the number of terms in the scan set. -### describe option that affects this. +Returns the number of terms in the scan set. In general, this will be +the scan-set size requested by the C option in the Connection +on which the scan was performed [default 10], but it may be fewer if +the scan is close to the end of the index. =head4 term() / display_term() -I<###> + $ss = $conn->scan('@attr 1=1004 whatever'); + ($term, $occurrences) = $ss->term(0); + ($displayTerm, $occurrences2) = $ss->display_term(0); + assert($occurrences == $occurrences2); + if (user_likes_the_look_of($displayTerm)) { + $rs = $conn->search_pqf('@attr 1=4 "' . $term . '"'); + assert($rs->size() == $occurrences); + } + +These methods return the scanned terms themselves. C returns +the term is a form suitable for submitting as part of a query, whereas +C returns it in a form suitable for displaying to a +user. Both versions also return the number of occurrences of the term +in the index, i.e. the number of hits that will be found if the term +is subsequently used in a query. + +In most cases, the term and display term will be identical; however, +they may be different in cases where punctuation or case is +normalised, or where identifiers rather than the original document +terms are indexed. =head4 option() -I<###> + print "scan status is ", $ss->option("scanStatus"); + +Allows options to be set into, and read from a ScanSet, just like +the Connection class's C method. There is no +C method for ScanSet objects. + +ScanSet options are also described, though not particularly +informatively, at +http://indexdata.com/yaz/doc/zoom.scan.tkl =head4 destroy() -I<###> + $ss->destroy() + +Destroys a ScanSet object, freeing its resources. It is an error to +reuse a ScanSet that has been Ced. =head2 ZOOM::Package I<###> +Package options are listed at +http://indexdata.com/yaz/doc/zoom.ext.html + =head2 ZOOM::Query I<###>