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


Manual Reference Pages  -  SEARCH::ODEUM (3)

.ds Aq ’

NAME

Search::Odeum - Perl interface to the Odeum inverted index API.

CONTENTS

SYNOPSIS

Create inverted index and put your document.



  use Search::Odeum;
 
  my $od = Search::Odeum->new(index, OD_OWRITER|OD_OCREAT);
  my $doc = Search::Odeum::Document->new(http://www.example.com/);
  $doc->attr(title => example.com);
  # ... break text into words.
  $doc->addword($normal, $asis);
  $od->put($doc);
  $od->close;



Search the inverted index to retrieve documents.



  use Search::Odeum;
 
  my $od = Search::Odeum->new(index, OD_OREADER);
  my $res = $od->search($word); # $res is-a Search::Odeum::Result
  while(my $doc = $res->next) {
      printf "%s\n", $doc->uri;
  }
  $od->close;



DESCRIPTION

Search::Odeum is an interface to the Odeum API. Odeum is the inverted index API which is a part of qdbm database library.

METHODS

Search::Odeum->new($name, $omode) Create new Search::Odeum instance. $name specifies the databse directory. $omode specifies the open mode.
put($doc, $wmax, $over) store a document into the database. $doc is a Search::Odeum::Document object. $wmax specifies the max number of words to be stored. the default is unlimited. $over specifies the duplicated document will be overwritten or not. the default behavior is true.
out($uri) delete a document from database. $uri specifies the document URI string.
outbyid($id) delete a document from database. $id specifies the document ID
get($uri) retrieve a document from database. $uri specifies the document URI string.
getbyid($id) retrieve a document from database. $id specifies the document ID
getidbyuri($uri) retrieve a document ID by the document URI. $uri specifies the document URI string.
check($id) check whether the specified document exists. $id specifies the document ID
search($word, $max) search inverted index. $word specifies the searching word. $max specifies the max number of documents to be retrieved. return value is a Search::Odeum::Result object.
searchdnum($word) get the number of documents including a word. this method is faster than search. $word specifies the searching word.
query($query) query a database using a small boolean query language.
sync synchronize updated contents to the device.
optimize optimize a database.
name get the name of database.
fsiz get the total size of database files.
bnum get the total number of the elements of the bucket arrays in the inverted index
busenum get the total number of the used elements of the bucket arrays in the inverted index
dnum get the number of documents in database.
wnum get the number of words in database.
writable check whether a database is writable or not.
fatalerror check whether a database has a fatal error or not.
inode get the inode number of a database directory.
mtime get the last modified time of a database.
close close a database handle.

SEE ALSO

http://qdbm.sourceforge.net/

AUTHOR

Tomohiro IKEBE, <ikebe@shebang.jp>

COPYRIGHT AND LICENSE

Copyright (C) 2007 by Tomohiro IKEBE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

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


perl v5.20.3 SEARCH::ODEUM (3) 2007-04-11

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