⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classxapian_1_1document.tex

📁 xapian 是一个“Xapian 是一个开源概率论信息检索库
💻 TEX
📖 第 1 页 / 共 2 页
字号:
\hypertarget{classXapian_1_1Document}{\section{Xapian::Document Class Reference}\label{classXapian_1_1Document}\index{Xapian::Document@{Xapian::Document}}}A document in the database - holds data, values, terms, and postings.  {\tt \#include $<$document.h$>$}Collaboration diagram for Xapian::Document:\begin{figure}[H]\begin{center}\leavevmode\includegraphics[width=119pt]{classXapian_1_1Document__coll__graph}\end{center}\end{figure}\subsection*{Public Member Functions}\begin{CompactItemize}\item \hypertarget{classXapian_1_1Document_aed3fcea3e5ab0bf9fc3d5b31fc0af52}{{\bf Document} (Internal $\ast$internal\_\-)}\label{classXapian_1_1Document_aed3fcea3e5ab0bf9fc3d5b31fc0af52}\item \hyperlink{classXapian_1_1Document_27316171adc74325e42d5e88b004e189}{Document} (const \hyperlink{classXapian_1_1Document}{Document} \&other)\begin{CompactList}\small\item\em Copying is allowed. \item\end{CompactList}\item void \hyperlink{classXapian_1_1Document_470144b154e9a7ec40b0875a8d636b9b}{operator=} (const \hyperlink{classXapian_1_1Document}{Document} \&other)\begin{CompactList}\small\item\em Assignment is allowed. \item\end{CompactList}\item \hyperlink{classXapian_1_1Document_e75d6c6a48b1cfed5b85189cb766531b}{Document} ()\begin{CompactList}\small\item\em Make a new empty \hyperlink{classXapian_1_1Document}{Document}. \item\end{CompactList}\item \hyperlink{classXapian_1_1Document_943a905545bd862dbc7281e6d66e5ee4}{$\sim$Document} ()\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item std::string \hyperlink{classXapian_1_1Document_035442647130c53f9d44b657eaa5772b}{get\_\-value} (\hyperlink{types_8h_f24564a367ebbc8f80cf9a1dbd1e81fd}{Xapian::valueno} value) const \begin{CompactList}\small\item\em Get value by number ($>$= 0). \item\end{CompactList}\item void \hyperlink{classXapian_1_1Document_44a99fe6f69a180f8504327d51b9671c}{add\_\-value} (\hyperlink{types_8h_f24564a367ebbc8f80cf9a1dbd1e81fd}{Xapian::valueno} \hyperlink{types_8h_f24564a367ebbc8f80cf9a1dbd1e81fd}{valueno}, const std::string \&value)\begin{CompactList}\small\item\em Add a new value. \item\end{CompactList}\item void \hyperlink{classXapian_1_1Document_b919d822838994edb5d99643cb0c2c03}{remove\_\-value} (\hyperlink{types_8h_f24564a367ebbc8f80cf9a1dbd1e81fd}{Xapian::valueno} \hyperlink{types_8h_f24564a367ebbc8f80cf9a1dbd1e81fd}{valueno})\begin{CompactList}\small\item\em Remove any value with the given number. \item\end{CompactList}\item void \hyperlink{classXapian_1_1Document_99f8cb1deeab46df42fed52ea4f55eb9}{clear\_\-values} ()\begin{CompactList}\small\item\em Remove all values associated with the document. \item\end{CompactList}\item std::string \hyperlink{classXapian_1_1Document_767026a91f3a1421f3d23f7a170509d4}{get\_\-data} () const \begin{CompactList}\small\item\em Get data stored in the document. \item\end{CompactList}\item void \hyperlink{classXapian_1_1Document_b1b0da2e7c76acd754f29a52e14f89ae}{set\_\-data} (const std::string \&data)\begin{CompactList}\small\item\em Set data stored in the document. \item\end{CompactList}\item void \hyperlink{classXapian_1_1Document_161943bb133fea0da4a21fa37621764b}{add\_\-posting} (const std::string \&tname, \hyperlink{types_8h_5cdae0172ef811a7c08017eb4429c311}{Xapian::termpos} tpos, \hyperlink{types_8h_6979d98ebbe67186bd31e5ee2a7585cb}{Xapian::termcount} wdfinc=1)\begin{CompactList}\small\item\em Add an occurrence of a term at a particular position. \item\end{CompactList}\item void \hyperlink{classXapian_1_1Document_730bb59dda98f19c61fe67360f0adb3a}{add\_\-term} (const std::string \&tname, \hyperlink{types_8h_6979d98ebbe67186bd31e5ee2a7585cb}{Xapian::termcount} wdfinc=1)\begin{CompactList}\small\item\em Add a term to the document, without positional information. \item\end{CompactList}\item \hyperlink{classXapian_1_1Document_4d3394c267aaa47c007d6996f39f9b3e}{XAPIAN\_\-DEPRECATED} (void add\_\-term\_\-nopos(const std::string \&term, \hyperlink{types_8h_6979d98ebbe67186bd31e5ee2a7585cb}{Xapian::termcount} wdfinc=1))\begin{CompactList}\small\item\em Old name for \hyperlink{classXapian_1_1Document_730bb59dda98f19c61fe67360f0adb3a}{add\_\-term()}. \item\end{CompactList}\item void \hyperlink{classXapian_1_1Document_11eec629737e496a7077b87f763967a5}{remove\_\-posting} (const std::string \&tname, \hyperlink{types_8h_5cdae0172ef811a7c08017eb4429c311}{Xapian::termpos} tpos, \hyperlink{types_8h_6979d98ebbe67186bd31e5ee2a7585cb}{Xapian::termcount} wdfdec=1)\begin{CompactList}\small\item\em Remove a posting of a term from the document. \item\end{CompactList}\item void \hyperlink{classXapian_1_1Document_01e5b7bf54fdee77a978c3b5f1b007ba}{remove\_\-term} (const std::string \&tname)\begin{CompactList}\small\item\em Remove a term and all postings associated with it. \item\end{CompactList}\item void \hyperlink{classXapian_1_1Document_a0bd9e001ffd29b0678938522d4e37e5}{clear\_\-terms} ()\begin{CompactList}\small\item\em Remove all terms (and postings) from the document. \item\end{CompactList}\item \hyperlink{types_8h_6979d98ebbe67186bd31e5ee2a7585cb}{Xapian::termcount} \hyperlink{classXapian_1_1Document_0249ddf18171ed53d851f9d82290eb62}{termlist\_\-count} () const \begin{CompactList}\small\item\em Count the terms in this document. \item\end{CompactList}\item \hyperlink{classXapian_1_1TermIterator}{Term\-Iterator} \hyperlink{classXapian_1_1Document_591cc11740bd0b293eaa77f117b7f0d6}{termlist\_\-begin} () const \begin{CompactList}\small\item\em Iterator for the terms in this document. \item\end{CompactList}\item \hyperlink{classXapian_1_1TermIterator}{Term\-Iterator} \hyperlink{classXapian_1_1Document_b4ba488b850b48b4972bb4e5f8ccf241}{termlist\_\-end} () const \begin{CompactList}\small\item\em Equivalent end iterator for \hyperlink{classXapian_1_1Document_591cc11740bd0b293eaa77f117b7f0d6}{termlist\_\-begin()}. \item\end{CompactList}\item \hyperlink{types_8h_6979d98ebbe67186bd31e5ee2a7585cb}{Xapian::termcount} \hyperlink{classXapian_1_1Document_139251ac7b57e67703f797b06793d21c}{values\_\-count} () const \begin{CompactList}\small\item\em Count the values in this document. \item\end{CompactList}\item \hyperlink{classXapian_1_1ValueIterator}{Value\-Iterator} \hyperlink{classXapian_1_1Document_1ed6315d39adbc6f3e19d7bcc95ad3fe}{values\_\-begin} () const \begin{CompactList}\small\item\em Iterator for the values in this document. \item\end{CompactList}\item \hyperlink{classXapian_1_1ValueIterator}{Value\-Iterator} \hyperlink{classXapian_1_1Document_0f8166c5d6feab897cafd0ab6e6dfaeb}{values\_\-end} () const \begin{CompactList}\small\item\em Equivalent end iterator for \hyperlink{classXapian_1_1Document_1ed6315d39adbc6f3e19d7bcc95ad3fe}{values\_\-begin()}. \item\end{CompactList}\item std::string \hyperlink{classXapian_1_1Document_eb93627c7cb0556c0935d5c2bb4f0847}{get\_\-description} () const \begin{CompactList}\small\item\em Introspection method. \item\end{CompactList}\end{CompactItemize}\subsection*{Public Attributes}\begin{CompactItemize}\item \hypertarget{classXapian_1_1Document_e53362f2bbf957158f90d2bd4521e27b}{\hyperlink{classXapian_1_1Internal_1_1RefCntPtr}{Xapian::Internal::Ref\-Cnt\-Ptr}$<$ Internal $>$ {\bf internal}}\label{classXapian_1_1Document_e53362f2bbf957158f90d2bd4521e27b}\end{CompactItemize}\subsection{Detailed Description}A document in the database - holds data, values, terms, and postings. \subsection{Constructor \& Destructor Documentation}\hypertarget{classXapian_1_1Document_27316171adc74325e42d5e88b004e189}{\index{Xapian::Document@{Xapian::Document}!Document@{Document}}\index{Document@{Document}!Xapian::Document@{Xapian::Document}}\subsubsection[Document]{\setlength{\rightskip}{0pt plus 5cm}Xapian::Document::Document (const \hyperlink{classXapian_1_1Document}{Document} \& {\em other})}}\label{classXapian_1_1Document_27316171adc74325e42d5e88b004e189}Copying is allowed. The internals are reference counted, so copying is cheap. \hypertarget{classXapian_1_1Document_e75d6c6a48b1cfed5b85189cb766531b}{\index{Xapian::Document@{Xapian::Document}!Document@{Document}}\index{Document@{Document}!Xapian::Document@{Xapian::Document}}\subsubsection[Document]{\setlength{\rightskip}{0pt plus 5cm}Xapian::Document::Document ()}}\label{classXapian_1_1Document_e75d6c6a48b1cfed5b85189cb766531b}Make a new empty \hyperlink{classXapian_1_1Document}{Document}. \hypertarget{classXapian_1_1Document_943a905545bd862dbc7281e6d66e5ee4}{\index{Xapian::Document@{Xapian::Document}!~Document@{$\sim$Document}}\index{~Document@{$\sim$Document}!Xapian::Document@{Xapian::Document}}\subsubsection[$\sim$Document]{\setlength{\rightskip}{0pt plus 5cm}Xapian::Document::$\sim$Document ()}}\label{classXapian_1_1Document_943a905545bd862dbc7281e6d66e5ee4}Destructor. \subsection{Member Function Documentation}\hypertarget{classXapian_1_1Document_161943bb133fea0da4a21fa37621764b}{\index{Xapian::Document@{Xapian::Document}!add_posting@{add\_\-posting}}\index{add_posting@{add\_\-posting}!Xapian::Document@{Xapian::Document}}\subsubsection[add\_\-posting]{\setlength{\rightskip}{0pt plus 5cm}void Xapian::Document::add\_\-posting (const std::string \& {\em tname}, \hyperlink{types_8h_5cdae0172ef811a7c08017eb4429c311}{Xapian::termpos} {\em tpos}, \hyperlink{types_8h_6979d98ebbe67186bd31e5ee2a7585cb}{Xapian::termcount} {\em wdfinc} = {\tt 1})}}\label{classXapian_1_1Document_161943bb133fea0da4a21fa37621764b}Add an occurrence of a term at a particular position. Multiple occurrences of the term at the same position are represented only once in the positional information, but do increase the wdf.If the term is not already in the document, it will be added to it.\begin{Desc}\item[Parameters:]\begin{description}\item[{\em tname}]The name of the term. \item[{\em tpos}]The position of the term. \item[{\em wdfinc}]The increment that will be applied to the wdf for this term. \end{description}\end{Desc}\hypertarget{classXapian_1_1Document_730bb59dda98f19c61fe67360f0adb3a}{\index{Xapian::Document@{Xapian::Document}!add_term@{add\_\-term}}\index{add_term@{add\_\-term}!Xapian::Document@{Xapian::Document}}\subsubsection[add\_\-term]{\setlength{\rightskip}{0pt plus 5cm}void Xapian::Document::add\_\-term (const std::string \& {\em tname}, \hyperlink{types_8h_6979d98ebbe67186bd31e5ee2a7585cb}{Xapian::termcount} {\em wdfinc} = {\tt 1})}}\label{classXapian_1_1Document_730bb59dda98f19c61fe67360f0adb3a}Add a term to the document, without positional information. Any existing positional information for the term will be left unmodified.\begin{Desc}\item[Parameters:]\begin{description}\item[{\em tname}]The name of the term. \item[{\em wdfinc}]The increment that will be applied to the wdf for this term. \end{description}\end{Desc}\hypertarget{classXapian_1_1Document_44a99fe6f69a180f8504327d51b9671c}{\index{Xapian::Document@{Xapian::Document}!add_value@{add\_\-value}}\index{add_value@{add\_\-value}!Xapian::Document@{Xapian::Document}}\subsubsection[add\_\-value]{\setlength{\rightskip}{0pt plus 5cm}void Xapian::Document::add\_\-value (\hyperlink{types_8h_f24564a367ebbc8f80cf9a1dbd1e81fd}{Xapian::valueno} {\em valueno}, const std::string \& {\em value})}}\label{classXapian_1_1Document_44a99fe6f69a180f8504327d51b9671c}Add a new value. It will replace any existing value with the same number. \hypertarget{classXapian_1_1Document_a0bd9e001ffd29b0678938522d4e37e5}{\index{Xapian::Document@{Xapian::Document}!clear_terms@{clear\_\-terms}}\index{clear_terms@{clear\_\-terms}!Xapian::Document@{Xapian::Document}}\subsubsection[clear\_\-terms]{\setlength{\rightskip}{0pt plus 5cm}void Xapian::Document::clear\_\-terms ()}}\label{classXapian_1_1Document_a0bd9e001ffd29b0678938522d4e37e5}Remove all terms (and postings) from the document. \hypertarget{classXapian_1_1Document_99f8cb1deeab46df42fed52ea4f55eb9}{\index{Xapian::Document@{Xapian::Document}!clear_values@{clear\_\-values}}\index{clear_values@{clear\_\-values}!Xapian::Document@{Xapian::Document}}\subsubsection[clear\_\-values]{\setlength{\rightskip}{0pt plus 5cm}void Xapian::Document::clear\_\-values ()}}\label{classXapian_1_1Document_99f8cb1deeab46df42fed52ea4f55eb9}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -