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       close
32           Close the database. This also implies a commit() unless a
33           transaction is in progress.
34
35       enquire [<query>]
36           Returns a new Search::Xapian::Enquire object. Any extra parameters
37           are passed to set_query.
38
39       get_doccount
40           Returns the number of document indexed in this database.
41
42       get_lastdocid
43           Returns the id of the last used document.
44
45       get_doclength <doc_id>
46           Returns the length of a given document.
47
48       get_document <doc_id>
49           Returns a Search::Xapian::Document object for the given document.
50
51       get_avlength
52           Get the average length of the documents in the database.
53
54       get_termfreq <term>
55           Get the number of documents in the database indexed by a given
56           term.
57
58       term_exists <term>
59           returns true if this term exists in the database, or false
60           otherwise.
61
62       get_description
63           return a description of this object.
64
65       get_spelling_suggestion
66           returns a suggested spelling correction.
67
68       allterms_begin [<prefix>]
69           Returns a Search::Xapian::TermIterator iterating over the termlist
70           for the the entire database.  If the optional prefix argument is
71           non-empty, only terms starting with that string are returned.
72
73       allterms_end [<prefix>]
74           Returns a Search::Xapian::TermIterator pointing to the end of the
75           termlist corresponding to allterms_begin.
76
77       termlist_begin <docid>
78           Returns a Search::Xapian::TermIterator pointing to the start of the
79           termlist for a given document.
80
81       termlist_end <docid>
82           Returns a Search::Xapian::TermIterator pointing to the end of the
83           termlist for a given document.
84
85       positionlist_begin <docid> <term>
86           Returns a Search::Xapian::PositionIterator pointing to the start of
87           the position list for a given term in the given document.
88
89       positionlist_end <docid> <term>
90           Returns a Search::Xapian::PositionIterator pointing to the end of
91           the position list for a given term in the given document.
92
93       postlist_begin <term>
94           Returns a Search::Xapian::PostingIterator pointing to the start of
95           the posting list for a given term.
96
97       postlist_end <term>
98           Returns a Search::Xapian::PostingIterator pointing to the end of
99           the posting list for a given term.
100
101       keep_alive
102           Send a "keep-alive" to remote databases to stop them timing out.
103
104       get_collection_freq <term>
105           Get the number of elements indexed by a certain term.
106

SEE ALSO

108       Search::Xapian, Search::Xapian::Enquire,
109       Search::Xapian::WritableDatabase
110
111
112
113perl v5.34.0                      2022-01-21               Xapian::Database(3)
Impressum