The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

NexTrieve::Replay - replay Querylog objects against Search objects

SYNOPSIS

 use NexTrieve;
 $ntv = NexTrieve->new( | {method => value} );
 $replay = $ntv->Replay( {method => value} );

 $replay = $ntv->Replay( {Search => $search, Querylog => $querylog} );
 while (!$replay->eof) {
   $hitlist = $replay->Hitlist;
 }

DESCRIPTION

The Replay object of the Perl support for NexTrieve. Do not create directly, but through the Replay method of the NexTrieve object.

The NexTrieve::Replay module allows you to re-perform queries that were logged in a query log file, to be searched again against the same or another search engine service. It is mainly intended for debugging and research purposes.

OBJECT METHODS

The following methods return objects.

Hitlist

 $hitlist = $replay->Hitlist;

The "Hitlist" method returns the next NexTrieve::Hitlist object that was the result of the next Query that was found in the Querylog that was "played" against the Search object.

The undefined value is returned when there were no more queries available in the query log file. The eof method can be called in advance to find out whether there are any queries left in the query log file.

See the NexTrieve::Hitlist module for more information.

Query

 $query = $replay->Query;

The "Query" method returns the NexTrieve::Query object that was used to create the last NexTrieve::Hitlist object that was returned.

See the NexTrieve::Query module for more information.

Querylog

 $replay->Querylog( $ntv->Querylog( filename ) );
 $querylog = $replay->Querylog;

The "Querylog" method specifies the NexTrieve::Querylog object that should be used to obtain queries from.

See the NexTrieve::Querylog module for more information.

 $replay->Search( $ntv->Search( $resource | server:port | port ) );
 $search = $replay->Search;

The "Search" method specifies the NexTrieve::Search object that should be used to send queries to and obtain hitlists from.

See the NexTrieve::Search module for more information.

OTHER METHODS

These methods show other properties of the NexTrieve::Replay module.

eof

 $isnowatend = $replay->eof;

The "eof" method returns whether there are no more queries found in the Querylog file. If it returns true, then all subsequent calls to Hitlist will return the undefine value.

AUTHOR

Elizabeth Mattijsen, <liz@dijkmat.nl>.

Please report bugs to <perlbugs@dijkmat.nl>.

COPYRIGHT

Copyright (c) 1995-2002 Elizabeth Mattijsen <liz@dijkmat.nl>. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

http://www.nextrieve.com, the NexTrieve.pm and the other NexTrieve::xxx modules.