📄 classxapian_1_1database.tex
字号:
\index{Xapian::Database@{Xapian::Database}!get_collection_freq@{get\_\-collection\_\-freq}}\index{get_collection_freq@{get\_\-collection\_\-freq}!Xapian::Database@{Xapian::Database}}\subsubsection[get\_\-collection\_\-freq]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{types_8h_6979d98ebbe67186bd31e5ee2a7585cb}{Xapian::termcount} Xapian::Database::get\_\-collection\_\-freq (const std::string \& {\em tname}) const}}\label{classXapian_1_1Database_eb8b2a78e6a7834bf0cc9e863bcfb95b}Return the total number of occurrences of the given term. This is the sum of the number of ocurrences of the term in each document it indexes: ie, the sum of the within document frequencies of the term.\begin{Desc}\item[Parameters:]\begin{description}\item[{\em tname}]The term whose collection frequency is being requested. \end{description}\end{Desc}\hypertarget{classXapian_1_1Database_59e5889c489ce77fb4e7ffd80b6bc52c}{\index{Xapian::Database@{Xapian::Database}!get_description@{get\_\-description}}\index{get_description@{get\_\-description}!Xapian::Database@{Xapian::Database}}\subsubsection[get\_\-description]{\setlength{\rightskip}{0pt plus 5cm}virtual std::string Xapian::Database::get\_\-description () const\hspace{0.3cm}{\tt \mbox{[}virtual\mbox{]}}}}\label{classXapian_1_1Database_59e5889c489ce77fb4e7ffd80b6bc52c}Introspection method. \begin{Desc}\item[Returns:]A string describing this object. \end{Desc}Reimplemented in \hyperlink{classXapian_1_1WritableDatabase_714ee6f7f21fd72307329a4ba21227a0}{Xapian::Writable\-Database}.\hypertarget{classXapian_1_1Database_c13c9f754b55edf7e25d754a150bd970}{\index{Xapian::Database@{Xapian::Database}!get_doccount@{get\_\-doccount}}\index{get_doccount@{get\_\-doccount}!Xapian::Database@{Xapian::Database}}\subsubsection[get\_\-doccount]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{types_8h_b4166dca4ac15d88c933bbb8e0d55d23}{Xapian::doccount} Xapian::Database::get\_\-doccount () const}}\label{classXapian_1_1Database_c13c9f754b55edf7e25d754a150bd970}Get the number of documents in the database. \hypertarget{classXapian_1_1Database_36b565741b2d7a5f0cfe600f811b13e7}{\index{Xapian::Database@{Xapian::Database}!get_doclength@{get\_\-doclength}}\index{get_doclength@{get\_\-doclength}!Xapian::Database@{Xapian::Database}}\subsubsection[get\_\-doclength]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{types_8h_7272583216038f810105df7dc927723c}{Xapian::doclength} Xapian::Database::get\_\-doclength (\hyperlink{types_8h_53073891e45d892a8d8a5d8f87f41402}{Xapian::docid} {\em did}) const}}\label{classXapian_1_1Database_36b565741b2d7a5f0cfe600f811b13e7}Get the length of a document. \hypertarget{classXapian_1_1Database_c36eafdcf748e11e533149674329f90b}{\index{Xapian::Database@{Xapian::Database}!get_document@{get\_\-document}}\index{get_document@{get\_\-document}!Xapian::Database@{Xapian::Database}}\subsubsection[get\_\-document]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{classXapian_1_1Document}{Xapian::Document} Xapian::Database::get\_\-document (\hyperlink{types_8h_53073891e45d892a8d8a5d8f87f41402}{Xapian::docid} {\em did}) const}}\label{classXapian_1_1Database_c36eafdcf748e11e533149674329f90b}Get a document from the database, given its document id. This method returns a \hyperlink{classXapian_1_1Document}{Xapian::Document} object which provides the information about a document.\begin{Desc}\item[Parameters:]\begin{description}\item[{\em did}]The document id for which to retrieve the data.\end{description}\end{Desc}\begin{Desc}\item[Returns:]A \hyperlink{classXapian_1_1Document}{Xapian::Document} object containing the document data\end{Desc}\begin{Desc}\item[Exceptions:]\begin{description}\item[{\em Xapian::Doc\-Not\-Found\-Error}]The document specified could not be found in the database. \end{description}\end{Desc}\hypertarget{classXapian_1_1Database_0c180d6facca7ca0e8486e7b995a6747}{\index{Xapian::Database@{Xapian::Database}!get_lastdocid@{get\_\-lastdocid}}\index{get_lastdocid@{get\_\-lastdocid}!Xapian::Database@{Xapian::Database}}\subsubsection[get\_\-lastdocid]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{types_8h_53073891e45d892a8d8a5d8f87f41402}{Xapian::docid} Xapian::Database::get\_\-lastdocid () const}}\label{classXapian_1_1Database_0c180d6facca7ca0e8486e7b995a6747}Get the highest document id which has been used in the database. \hypertarget{classXapian_1_1Database_61d9b1e634aff99280a5fcdfc5087cdc}{\index{Xapian::Database@{Xapian::Database}!get_termfreq@{get\_\-termfreq}}\index{get_termfreq@{get\_\-termfreq}!Xapian::Database@{Xapian::Database}}\subsubsection[get\_\-termfreq]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{types_8h_b4166dca4ac15d88c933bbb8e0d55d23}{Xapian::doccount} Xapian::Database::get\_\-termfreq (const std::string \& {\em tname}) const}}\label{classXapian_1_1Database_61d9b1e634aff99280a5fcdfc5087cdc}Get the number of documents in the database indexed by a given term. \hypertarget{classXapian_1_1Database_759d1fde0d3d8a2ed74b83c0ebd10974}{\index{Xapian::Database@{Xapian::Database}!keep_alive@{keep\_\-alive}}\index{keep_alive@{keep\_\-alive}!Xapian::Database@{Xapian::Database}}\subsubsection[keep\_\-alive]{\setlength{\rightskip}{0pt plus 5cm}void Xapian::Database::keep\_\-alive ()}}\label{classXapian_1_1Database_759d1fde0d3d8a2ed74b83c0ebd10974}Send a \char`\"{}keep-alive\char`\"{} to remote databases to stop them timing out. \hypertarget{classXapian_1_1Database_4e8badea7a9d7292c13f99429c6a2b79}{\index{Xapian::Database@{Xapian::Database}!operator=@{operator=}}\index{operator=@{operator=}!Xapian::Database@{Xapian::Database}}\subsubsection[operator=]{\setlength{\rightskip}{0pt plus 5cm}void Xapian::Database::operator= (const \hyperlink{classXapian_1_1Database}{Database} \& {\em other})}}\label{classXapian_1_1Database_4e8badea7a9d7292c13f99429c6a2b79}Assignment is allowed. The internals are reference counted, so assignment is cheap. \hypertarget{classXapian_1_1Database_9fb4987b5f0e13b8344a89d1898f5500}{\index{Xapian::Database@{Xapian::Database}!positionlist_begin@{positionlist\_\-begin}}\index{positionlist_begin@{positionlist\_\-begin}!Xapian::Database@{Xapian::Database}}\subsubsection[positionlist\_\-begin]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{classXapian_1_1PositionIterator}{Position\-Iterator} Xapian::Database::positionlist\_\-begin (\hyperlink{types_8h_53073891e45d892a8d8a5d8f87f41402}{Xapian::docid} {\em did}, const std::string \& {\em tname}) const}}\label{classXapian_1_1Database_9fb4987b5f0e13b8344a89d1898f5500}An iterator pointing to the start of the position list for a given term in a given document. \hypertarget{classXapian_1_1Database_ef7093cb5cfd969c4b07593e26d208e3}{\index{Xapian::Database@{Xapian::Database}!positionlist_end@{positionlist\_\-end}}\index{positionlist_end@{positionlist\_\-end}!Xapian::Database@{Xapian::Database}}\subsubsection[positionlist\_\-end]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{classXapian_1_1PositionIterator}{Position\-Iterator} Xapian::Database::positionlist\_\-end (\hyperlink{types_8h_53073891e45d892a8d8a5d8f87f41402}{Xapian::docid}, const std::string \&) const\hspace{0.3cm}{\tt \mbox{[}inline\mbox{]}}}}\label{classXapian_1_1Database_ef7093cb5cfd969c4b07593e26d208e3}Corresponding end iterator to \hyperlink{classXapian_1_1Database_9fb4987b5f0e13b8344a89d1898f5500}{positionlist\_\-begin()}. \hypertarget{classXapian_1_1Database_504d8e800384d12a8f9defee39362f5e}{\index{Xapian::Database@{Xapian::Database}!postlist_begin@{postlist\_\-begin}}\index{postlist_begin@{postlist\_\-begin}!Xapian::Database@{Xapian::Database}}\subsubsection[postlist\_\-begin]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{classXapian_1_1PostingIterator}{Posting\-Iterator} Xapian::Database::postlist\_\-begin (const std::string \& {\em tname}) const}}\label{classXapian_1_1Database_504d8e800384d12a8f9defee39362f5e}An iterator pointing to the start of the postlist for a given term. \hypertarget{classXapian_1_1Database_c1661ac2876a4a69f327907ef47a003d}{\index{Xapian::Database@{Xapian::Database}!postlist_end@{postlist\_\-end}}\index{postlist_end@{postlist\_\-end}!Xapian::Database@{Xapian::Database}}\subsubsection[postlist\_\-end]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{classXapian_1_1PostingIterator}{Posting\-Iterator} Xapian::Database::postlist\_\-end (const std::string \&) const\hspace{0.3cm}{\tt \mbox{[}inline\mbox{]}}}}\label{classXapian_1_1Database_c1661ac2876a4a69f327907ef47a003d}Corresponding end iterator to \hyperlink{classXapian_1_1Database_504d8e800384d12a8f9defee39362f5e}{postlist\_\-begin()}. \hypertarget{classXapian_1_1Database_f140b1f8d948d13cf7be4a11a7c699a4}{\index{Xapian::Database@{Xapian::Database}!reopen@{reopen}}\index{reopen@{reopen}!Xapian::Database@{Xapian::Database}}\subsubsection[reopen]{\setlength{\rightskip}{0pt plus 5cm}void Xapian::Database::reopen ()}}\label{classXapian_1_1Database_f140b1f8d948d13cf7be4a11a7c699a4}Re-open the database. This re-opens the database(s) to the latest available version(s). It can be used either to make sure the latest results are returned, or to recover from a Xapian::Database\-Modified\-Error. \hypertarget{classXapian_1_1Database_22509662f07387074beb1e9919e8e1e9}{\index{Xapian::Database@{Xapian::Database}!term_exists@{term\_\-exists}}\index{term_exists@{term\_\-exists}!Xapian::Database@{Xapian::Database}}\subsubsection[term\_\-exists]{\setlength{\rightskip}{0pt plus 5cm}bool Xapian::Database::term\_\-exists (const std::string \& {\em tname}) const}}\label{classXapian_1_1Database_22509662f07387074beb1e9919e8e1e9}Check if a given term exists in the database. Return true if and only if the term exists in the database. This is the same as (get\_\-termfreq(tname) != 0), but will often be more efficient. \hypertarget{classXapian_1_1Database_c26b8f8f564c37586c7a0bd35cfefe15}{\index{Xapian::Database@{Xapian::Database}!termlist_begin@{termlist\_\-begin}}\index{termlist_begin@{termlist\_\-begin}!Xapian::Database@{Xapian::Database}}\subsubsection[termlist\_\-begin]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{classXapian_1_1TermIterator}{Term\-Iterator} Xapian::Database::termlist\_\-begin (\hyperlink{types_8h_53073891e45d892a8d8a5d8f87f41402}{Xapian::docid} {\em did}) const}}\label{classXapian_1_1Database_c26b8f8f564c37586c7a0bd35cfefe15}An iterator pointing to the start of the termlist for a given document. \hypertarget{classXapian_1_1Database_a6f20c07f93d53f35caf6c97c795a5a1}{\index{Xapian::Database@{Xapian::Database}!termlist_end@{termlist\_\-end}}\index{termlist_end@{termlist\_\-end}!Xapian::Database@{Xapian::Database}}\subsubsection[termlist\_\-end]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{classXapian_1_1TermIterator}{Term\-Iterator} Xapian::Database::termlist\_\-end (\hyperlink{types_8h_53073891e45d892a8d8a5d8f87f41402}{Xapian::docid}) const\hspace{0.3cm}{\tt \mbox{[}inline\mbox{]}}}}\label{classXapian_1_1Database_a6f20c07f93d53f35caf6c97c795a5a1}Corresponding end iterator to \hyperlink{classXapian_1_1Database_c26b8f8f564c37586c7a0bd35cfefe15}{termlist\_\-begin()}. The documentation for this class was generated from the following file:\begin{CompactItemize}\item include/xapian/\hyperlink{database_8h}{database.h}\end{CompactItemize}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -