GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Plucene::Index::Reader(3) User Contributed Perl Documentation Plucene::Index::Reader(3)

Plucene::Index::Reader - Abstract class for accessing an index

IndexReader is an abstract class, providing an interface for accessing an index. Search of an index is done entirely through this abstract interface, so that any subclass which implements it is searchable.

Concrete subclasses of IndexReader are usually constructed with a call to the static method "open".

For efficiency, in this API documents are often referred to via document numbers, non-negative integers which each name a unique document in the index. These document numbers are ephemeral--they may change as documents are added to and deleted from an index. Clients should thus not rely on a given document having the same number between sessions.

        my $reader = Plucene::Index::Reader->new($dir_name);

This will create a new Plucene::Index::Reader with the passed in directory.

        # If there is only one segment
        my Plucene::Index::SegmentReader $seg_read = $reader->open;

        # If there are many segments
        my Plucene::Index::SegmentsReader $seg_read = $reader->open;

Returns an IndexReader reading the index in the given Directory.

        my $last_modified = Plucene::Index::Reader->last_modified($directory);

        if (Plucene::Index::Reader->index_exists($directory)){ ... }

        if (Plucene::Index::Reader->is_locked($directory)){ ... }

        $reader->delete($doc);

        $reader->delete_term($term);

This will delete all the documents which contain the passed term.

        $reader->close;

        $reader->unlock($directory);

These must be defined in a subclass
2005-09-05 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.