1Xapian::Database(3)   User Contributed Perl Documentation  Xapian::Database(3)
2
3
4

NAME

6       Search::Xapian::Database - Search database object
7

DESCRIPTION

9       This class represents a Xapian database for searching. See
10       Search::Xapian::WritableDatabase for an object suitable for indexing.
11       To perform searches, this class works with the Search::Xapian::Query
12       object.
13

METHODS

15       new <database>
16           Class constructor. Can either take a path to an existing database
17           or another database class as the first parameter
18
19       clone
20           Return a clone of this class.
21
22       add_database
23           Add an existing database (or group of databases) to those accessed
24           by this object.
25
26       reopen
27           This re-opens the database(s) to the latest available version(s).
28           It can be used either to make sure the latest results are returned,
29           or to recover from a Xapian::DatabaseModifiedError.
30
31       enquire [<query>]
32           Returns a new Search::Xapian::Enquire object. Any extra parameters
33           are passed to set_query.
34
35       get_doccount
36           Returns the number of document indexed in this database.
37
38       get_lastdocid
39           Returns the id of the last used document.
40
41       get_doclength <doc_id>
42           Returns the length of a given document.
43
44       get_document <doc_id>
45           Returns a Search::Xapian::Document object for the given document.
46
47       get_avlength
48           Get the average length of the documents in the database.
49
50       get_termfreq <term>
51           Get the number of documents in the database indexed by a given
52           term.
53
54       term_exists <term>
55           returns true if this term exists in the database, or false
56           otherwise.
57
58       get_description
59           return a description of this object.
60
61       get_spelling_suggestion
62           returns a suggested spelling correction.
63
64       allterms_begin [<prefix>]
65           Returns a Search::Xapian::TermIterator iterating over the termlist
66           for the the entire database.  If the optional prefix argument is
67           non-empty, only terms starting with that string are returned.
68
69       allterms_end [<prefix>]
70           Returns a Search::Xapian::TermIterator pointing to the end of the
71           termlist corresponding to allterms_begin.
72
73       termlist_begin <docid>
74           Returns a Search::Xapian::TermIterator pointing to the start of the
75           termlist for a given document.
76
77       termlist_end <docid>
78           Returns a Search::Xapian::TermIterator pointing to the end of the
79           termlist for a given document.
80
81       positionlist_begin <docid> <term>
82           Returns a Search::Xapian::PositionIterator pointing to the start of
83           the position list for a given term in the given document.
84
85       positionlist_end <docid> <term>
86           Returns a Search::Xapian::PositionIterator pointing to the end of
87           the position list for a given term in the given document.
88
89       postlist_begin <term>
90           Returns a Search::Xapian::PostingIterator pointing to the start of
91           the posting list for a given term.
92
93       postlist_end <term>
94           Returns a Search::Xapian::PostingIterator pointing to the end of
95           the posting list for a given term.
96
97       keep_alive
98           Send a "keep-alive" to remote databases to stop them timing out.
99
100       get_collection_freq <term>
101           Get the number of elements indexed by a certain term.
102

SEE ALSO

104       Search::Xapian,Search::Xapian::Enquire,Search::Xapian::WritableDatabase
105
106
107
108perl v5.12.0                      2010-04-27               Xapian::Database(3)
Impressum