WebService::Lucene::Index - Object to represent a Lucene Index
# Index @ $url $index = WebService::Lucene::Index->new( $url ); # Get most recently modified documents $results = $index->list; # Search the index $results = $index->search( 'foo' ); # Get a document $doc = $index->get_document( $id ); # Create a document $doc = $index->create_document( $doc ); # Delete the index $index->delete;
The module represents a Lucene Index.
Create a new Index object located at $url. Note, this will not actually create the index -- see create to do that.
$url
create
Accessor for the index's url.
Accessor for the index's name.
Accessor for the index's properties.
Fetches the index.properties entry and sends the contents to _parse_index_properties.
index.properties
_parse_index_properties
Parses the XOXO document and sets the properties accessor.
properties
Deletes the current index.
Updates the index.properties file with the current set of properties.
Give a facet (or set of facets as an array reference), it will return a WebService::Lucene::Results object with their details. You can pass any number of parameters that will be serialized as query string arguments.
Returns a WebService::Lucene::Results object with a list of the recently updated documents.
Optimizes the index.
Sends a create query to the server for the given index.
Adds $document to the index.
$document
Returns a WebService::Lucene::Document.
Deletes a document from the index
Constructs an XML::Atom::Entry object representing the index's properties.
returns an WWW::OpenSearch object for the index.
Searches the index for $query. Pass any additional parameters as a hashref.
$query
True if the index exists on the server, otherwise false is returned.
Brian Cassidy <brian.cassidy@nald.ca>
Adam Paynter <adam.paynter@nald.ca>
Copyright 2006-2009 National Adult Literacy Database
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install WebService::Lucene, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Lucene
CPAN shell
perl -MCPAN -e shell install WebService::Lucene
For more information on module installation, please visit the detailed CPAN module installation guide.