📄 classxapian_1_1mset.tex
字号:
\hypertarget{classXapian_1_1MSet}{\section{Xapian::MSet Class Reference}\label{classXapian_1_1MSet}\index{Xapian::MSet@{Xapian::MSet}}}A match set (\hyperlink{classXapian_1_1MSet}{MSet}). {\tt \#include $<$enquire.h$>$}Collaboration diagram for Xapian::MSet:\begin{figure}[H]\begin{center}\leavevmode\includegraphics[width=119pt]{classXapian_1_1MSet__coll__graph}\end{center}\end{figure}\subsection*{Public Types}\begin{Indent}{\bf }\par\begin{CompactItemize}\item typedef \hyperlink{classXapian_1_1MSetIterator}{MSet\-Iterator} \hyperlink{classXapian_1_1MSet_4231ddc9c8db70ecdd93c321a92e22bd}{value\_\-type}\begin{CompactList}\small\item\em Allow use as an STL container. \item\end{CompactList}\item \hypertarget{classXapian_1_1MSet_d42cc068683f5617a17c2389aa69e24d}{typedef \hyperlink{classXapian_1_1MSetIterator}{MSet\-Iterator} {\bf iterator}}\label{classXapian_1_1MSet_d42cc068683f5617a17c2389aa69e24d}\item \hypertarget{classXapian_1_1MSet_3e1cf112c2a7f10a3e296d880fc7305d}{typedef \hyperlink{classXapian_1_1MSetIterator}{MSet\-Iterator} {\bf const\_\-iterator}}\label{classXapian_1_1MSet_3e1cf112c2a7f10a3e296d880fc7305d}\item \hypertarget{classXapian_1_1MSet_96269c51f568b512f75427fbb4adfca1}{typedef \hyperlink{classXapian_1_1MSetIterator}{MSet\-Iterator} \& {\bf reference}}\label{classXapian_1_1MSet_96269c51f568b512f75427fbb4adfca1}\item \hypertarget{classXapian_1_1MSet_3f9841ca77ac0b6dbe082a4761e06cc8}{typedef \hyperlink{classXapian_1_1MSetIterator}{MSet\-Iterator} \& {\bf const\_\-reference}}\label{classXapian_1_1MSet_3f9841ca77ac0b6dbe082a4761e06cc8}\item \hypertarget{classXapian_1_1MSet_152550c0053b1bf0c94c575dfc210a60}{typedef \hyperlink{classXapian_1_1MSetIterator}{MSet\-Iterator} $\ast$ {\bf pointer}}\label{classXapian_1_1MSet_152550c0053b1bf0c94c575dfc210a60}\item \hypertarget{classXapian_1_1MSet_1ea96beb6135d960f9c4ff1320116508}{typedef \hyperlink{types_8h_d8243c2a1cbe7e9f88ab4704233f531e}{Xapian::doccount\_\-diff} {\bf difference\_\-type}}\label{classXapian_1_1MSet_1ea96beb6135d960f9c4ff1320116508}\item \hypertarget{classXapian_1_1MSet_425525da26231b848a8845c39fdc22af}{typedef \hyperlink{types_8h_b4166dca4ac15d88c933bbb8e0d55d23}{Xapian::doccount} {\bf size\_\-type}}\label{classXapian_1_1MSet_425525da26231b848a8845c39fdc22af}\end{CompactItemize}\end{Indent}\subsection*{Public Member Functions}\begin{CompactItemize}\item \hypertarget{classXapian_1_1MSet_cbebac9e02380e8111cb0a278d5adffa}{{\bf MSet} (MSet::Internal $\ast$internal\_\-)}\label{classXapian_1_1MSet_cbebac9e02380e8111cb0a278d5adffa}\item \hyperlink{classXapian_1_1MSet_2731b94a40e99a83c3e5d516809dc2e3}{MSet} ()\begin{CompactList}\small\item\em Create an empty \hyperlink{classXapian_1_1MSet}{Xapian::MSet}. \item\end{CompactList}\item \hyperlink{classXapian_1_1MSet_84b1c1a6db62dee0ca1aefadf4ef2d18}{$\sim$MSet} ()\begin{CompactList}\small\item\em Destroy a \hyperlink{classXapian_1_1MSet}{Xapian::MSet}. \item\end{CompactList}\item \hyperlink{classXapian_1_1MSet_f94806ac9be50ee0a13d291070645eed}{MSet} (const \hyperlink{classXapian_1_1MSet}{MSet} \&other)\begin{CompactList}\small\item\em Copying is allowed (and is cheap). \item\end{CompactList}\item void \hyperlink{classXapian_1_1MSet_9f4ba7407c17baa32ce9b3a7cd7d3f05}{operator=} (const \hyperlink{classXapian_1_1MSet}{MSet} \&other)\begin{CompactList}\small\item\em Assignment is allowed (and is cheap). \item\end{CompactList}\item void \hyperlink{classXapian_1_1MSet_52d96c2df7e63c3fd674e234c0a7c009}{fetch} (const \hyperlink{classXapian_1_1MSetIterator}{MSet\-Iterator} \&begin, const \hyperlink{classXapian_1_1MSetIterator}{MSet\-Iterator} \&end) const \begin{CompactList}\small\item\em Fetch the the document info for a set of items in the \hyperlink{classXapian_1_1MSet}{MSet}. \item\end{CompactList}\item void \hyperlink{classXapian_1_1MSet_367ce5b6d717042d9baf3c4285272add}{fetch} (const \hyperlink{classXapian_1_1MSetIterator}{MSet\-Iterator} \&item) const \begin{CompactList}\small\item\em Fetch the single item specified. \item\end{CompactList}\item void \hyperlink{classXapian_1_1MSet_fd639440abc4d569a48b8ff2a88c6e6a}{fetch} () const \begin{CompactList}\small\item\em Fetch all the items in the \hyperlink{classXapian_1_1MSet}{MSet}. \item\end{CompactList}\item \hyperlink{types_8h_d9213278aaed43f1ab0110c87a6b7476}{Xapian::percent} \hyperlink{classXapian_1_1MSet_2211a081b75ebb0c0bd99346a01cb255}{convert\_\-to\_\-percent} (\hyperlink{types_8h_167860ee249b702eb746dca0d245f808}{Xapian::weight} wt) const \begin{CompactList}\small\item\em This converts the weight supplied to a percentage score. \item\end{CompactList}\item \hyperlink{types_8h_d9213278aaed43f1ab0110c87a6b7476}{Xapian::percent} \hyperlink{classXapian_1_1MSet_0c64c6427f73afc9bc3d9ae6d40a4e19}{convert\_\-to\_\-percent} (const \hyperlink{classXapian_1_1MSetIterator}{MSet\-Iterator} \&it) const \begin{CompactList}\small\item\em Return the percentage score for a particular item. \item\end{CompactList}\item \hyperlink{types_8h_b4166dca4ac15d88c933bbb8e0d55d23}{Xapian::doccount} \hyperlink{classXapian_1_1MSet_8b53e97c924c671052f14f690061d0ea}{get\_\-termfreq} (const std::string \&tname) const \begin{CompactList}\small\item\em Return the term frequency of the given query term. \item\end{CompactList}\item \hyperlink{types_8h_167860ee249b702eb746dca0d245f808}{Xapian::weight} \hyperlink{classXapian_1_1MSet_ab7d3fbad74151431e99659b4cd0a016}{get\_\-termweight} (const std::string \&tname) const \begin{CompactList}\small\item\em Return the term weight of the given query term. \item\end{CompactList}\item \hyperlink{types_8h_b4166dca4ac15d88c933bbb8e0d55d23}{Xapian::doccount} \hyperlink{classXapian_1_1MSet_a347db8d918c7e3b1f2f9e256807229f}{get\_\-firstitem} () const \begin{CompactList}\small\item\em The index of the first item in the result which was put into the \hyperlink{classXapian_1_1MSet}{MSet}. \item\end{CompactList}\item \hyperlink{types_8h_b4166dca4ac15d88c933bbb8e0d55d23}{Xapian::doccount} \hyperlink{classXapian_1_1MSet_50eda0fe21978d088b66e63cfb074814}{get\_\-matches\_\-lower\_\-bound} () const \begin{CompactList}\small\item\em A lower bound on the number of documents in the database which match the query. \item\end{CompactList}\item \hyperlink{types_8h_b4166dca4ac15d88c933bbb8e0d55d23}{Xapian::doccount} \hyperlink{classXapian_1_1MSet_eab0a82126d9f2cf0ef5321549ea9775}{get\_\-matches\_\-estimated} () const \begin{CompactList}\small\item\em An estimate for the number of documents in the database which match the query. \item\end{CompactList}\item \hyperlink{types_8h_b4166dca4ac15d88c933bbb8e0d55d23}{Xapian::doccount} \hyperlink{classXapian_1_1MSet_b7c924c5f2b7e8dee83e533f7a9a7308}{get\_\-matches\_\-upper\_\-bound} () const \begin{CompactList}\small\item\em An upper bound on the number of documents in the database which match the query. \item\end{CompactList}\item \hyperlink{types_8h_167860ee249b702eb746dca0d245f808}{Xapian::weight} \hyperlink{classXapian_1_1MSet_8317991625dc79949cd6ae52b6dcc920}{get\_\-max\_\-possible} () const \begin{CompactList}\small\item\em The maximum possible weight in the mset. \item\end{CompactList}\item \hyperlink{types_8h_167860ee249b702eb746dca0d245f808}{Xapian::weight} \hyperlink{classXapian_1_1MSet_8964042d7eeb9e908edd160d07768531}{get\_\-max\_\-attained} () const \begin{CompactList}\small\item\em The greatest weight which is attained by any document in the database. \item\end{CompactList}\item \hyperlink{types_8h_b4166dca4ac15d88c933bbb8e0d55d23}{Xapian::doccount} \hyperlink{classXapian_1_1MSet_3b050b4734ab96ea08b4f4b396b03ff9}{size} () const \begin{CompactList}\small\item\em The number of items in this \hyperlink{classXapian_1_1MSet}{MSet}. \item\end{CompactList}\item \hyperlink{types_8h_b4166dca4ac15d88c933bbb8e0d55d23}{Xapian::doccount} \hyperlink{classXapian_1_1MSet_44c58632455ae84fb0464eb8c1bd3682}{max\_\-size} () const \begin{CompactList}\small\item\em Required to allow use as an STL container. \item\end{CompactList}\item bool \hyperlink{classXapian_1_1MSet_fdd5c88361d0b83fc007a0aef92363b9}{empty} () const \begin{CompactList}\small\item\em Test if this \hyperlink{classXapian_1_1MSet}{MSet} is empty. \item\end{CompactList}\item void \hyperlink{classXapian_1_1MSet_8fa74c8d41283fae491f46c690a455cf}{swap} (\hyperlink{classXapian_1_1MSet}{MSet} \&other)\begin{CompactList}\small\item\em Swap the \hyperlink{classXapian_1_1MSet}{MSet} we point to with another. \item\end{CompactList}\item \hyperlink{classXapian_1_1MSetIterator}{MSet\-Iterator} \hyperlink{classXapian_1_1MSet_4c5ef6da9fd73cede679081be26df41e}{begin} () const \begin{CompactList}\small\item\em Iterator for the terms in this \hyperlink{classXapian_1_1MSet}{MSet}. \item\end{CompactList}\item \hyperlink{classXapian_1_1MSetIterator}{MSet\-Iterator} \hyperlink{classXapian_1_1MSet_8fbd9cc68354f519f8773b35d121144b}{end} () const \begin{CompactList}\small\item\em End iterator corresponding to \hyperlink{classXapian_1_1MSet_4c5ef6da9fd73cede679081be26df41e}{begin()}. \item\end{CompactList}\item \hyperlink{classXapian_1_1MSetIterator}{MSet\-Iterator} \hyperlink{classXapian_1_1MSet_28f44ecf0fbfe729d73e9841fe0172e0}{back} () const \begin{CompactList}\small\item\em Iterator pointing to the last element of this \hyperlink{classXapian_1_1MSet}{MSet}. \item\end{CompactList}\item \hyperlink{classXapian_1_1MSetIterator}{MSet\-Iterator} \hyperlink{classXapian_1_1MSet_e2da2d1b79ed814652b7c3b3781c2249}{operator\mbox{[}$\,$\mbox{]}} (\hyperlink{types_8h_b4166dca4ac15d88c933bbb8e0d55d23}{Xapian::doccount} i) const \begin{CompactList}\small\item\em This returns the document at position i in this \hyperlink{classXapian_1_1MSet}{MSet} object. \item\end{CompactList}\item std::string \hyperlink{classXapian_1_1MSet_78297ec3345af21e915eb061cddca80c}{get\_\-description} () const \begin{CompactList}\small\item\em Returns a string representing the mset. \item\end{CompactList}\end{CompactItemize}\subsection*{Public Attributes}\begin{CompactItemize}\item \hypertarget{classXapian_1_1MSet_c0ba3af100edf63a49cfbec7f118e3f3}{\hyperlink{classXapian_1_1Internal_1_1RefCntPtr}{Xapian::Internal::Ref\-Cnt\-Ptr}$<$ Internal $>$ {\bf internal}}\label{classXapian_1_1MSet_c0ba3af100edf63a49cfbec7f118e3f3}\end{CompactItemize}\subsection{Detailed Description}A match set (\hyperlink{classXapian_1_1MSet}{MSet}). This class represents (a portion of) the results of a query. \subsection{Member Typedef Documentation}\hypertarget{classXapian_1_1MSet_4231ddc9c8db70ecdd93c321a92e22bd}{\index{Xapian::MSet@{Xapian::MSet}!value_type@{value\_\-type}}\index{value_type@{value\_\-type}!Xapian::MSet@{Xapian::MSet}}\subsubsection[value\_\-type]{\setlength{\rightskip}{0pt plus 5cm}typedef \hyperlink{classXapian_1_1MSetIterator}{MSet\-Iterator} \hyperlink{classXapian_1_1MSetIterator}{Xapian::MSet::value\_\-type}}}\label{classXapian_1_1MSet_4231ddc9c8db70ecdd93c321a92e22bd}Allow use as an STL container. \subsection{Constructor \& Destructor Documentation}\hypertarget{classXapian_1_1MSet_2731b94a40e99a83c3e5d516809dc2e3}{\index{Xapian::MSet@{Xapian::MSet}!MSet@{MSet}}\index{MSet@{MSet}!Xapian::MSet@{Xapian::MSet}}\subsubsection[MSet]{\setlength{\rightskip}{0pt plus 5cm}Xapian::MSet::MSet ()}}\label{classXapian_1_1MSet_2731b94a40e99a83c3e5d516809dc2e3}Create an empty \hyperlink{classXapian_1_1MSet}{Xapian::MSet}. \hypertarget{classXapian_1_1MSet_84b1c1a6db62dee0ca1aefadf4ef2d18}{\index{Xapian::MSet@{Xapian::MSet}!~MSet@{$\sim$MSet}}\index{~MSet@{$\sim$MSet}!Xapian::MSet@{Xapian::MSet}}\subsubsection[$\sim$MSet]{\setlength{\rightskip}{0pt plus 5cm}Xapian::MSet::$\sim$MSet ()}}\label{classXapian_1_1MSet_84b1c1a6db62dee0ca1aefadf4ef2d18}Destroy a \hyperlink{classXapian_1_1MSet}{Xapian::MSet}. \hypertarget{classXapian_1_1MSet_f94806ac9be50ee0a13d291070645eed}{\index{Xapian::MSet@{Xapian::MSet}!MSet@{MSet}}\index{MSet@{MSet}!Xapian::MSet@{Xapian::MSet}}\subsubsection[MSet]{\setlength{\rightskip}{0pt plus 5cm}Xapian::MSet::MSet (const \hyperlink{classXapian_1_1MSet}{MSet} \& {\em other})}}\label{classXapian_1_1MSet_f94806ac9be50ee0a13d291070645eed}Copying is allowed (and is cheap). \subsection{Member Function Documentation}\hypertarget{classXapian_1_1MSet_28f44ecf0fbfe729d73e9841fe0172e0}{\index{Xapian::MSet@{Xapian::MSet}!back@{back}}\index{back@{back}!Xapian::MSet@{Xapian::MSet}}\subsubsection[back]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{classXapian_1_1MSetIterator}{MSet\-Iterator} Xapian::MSet::back () const}}\label{classXapian_1_1MSet_28f44ecf0fbfe729d73e9841fe0172e0}Iterator pointing to the last element of this \hyperlink{classXapian_1_1MSet}{MSet}. \hypertarget{classXapian_1_1MSet_4c5ef6da9fd73cede679081be26df41e}{\index{Xapian::MSet@{Xapian::MSet}!begin@{begin}}\index{begin@{begin}!Xapian::MSet@{Xapian::MSet}}\subsubsection[begin]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{classXapian_1_1MSetIterator}{MSet\-Iterator} Xapian::MSet::begin () const}}\label{classXapian_1_1MSet_4c5ef6da9fd73cede679081be26df41e}Iterator for the terms in this \hyperlink{classXapian_1_1MSet}{MSet}. \hypertarget{classXapian_1_1MSet_0c64c6427f73afc9bc3d9ae6d40a4e19}{\index{Xapian::MSet@{Xapian::MSet}!convert_to_percent@{convert\_\-to\_\-percent}}\index{convert_to_percent@{convert\_\-to\_\-percent}!Xapian::MSet@{Xapian::MSet}}\subsubsection[convert\_\-to\_\-percent]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{types_8h_d9213278aaed43f1ab0110c87a6b7476}{Xapian::percent} Xapian::MSet::convert\_\-to\_\-percent (const \hyperlink{classXapian_1_1MSetIterator}{MSet\-Iterator} \& {\em it}) const}}\label{classXapian_1_1MSet_0c64c6427f73afc9bc3d9ae6d40a4e19}Return the percentage score for a particular item. \hypertarget{classXapian_1_1MSet_2211a081b75ebb0c0bd99346a01cb255}{\index{Xapian::MSet@{Xapian::MSet}!convert_to_percent@{convert\_\-to\_\-percent}}\index{convert_to_percent@{convert\_\-to\_\-percent}!Xapian::MSet@{Xapian::MSet}}\subsubsection[convert\_\-to\_\-percent]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{types_8h_d9213278aaed43f1ab0110c87a6b7476}{Xapian::percent} Xapian::MSet::convert\_\-to\_\-percent (\hyperlink{types_8h_167860ee249b702eb746dca0d245f808}{Xapian::weight} {\em wt}) const}}\label{classXapian_1_1MSet_2211a081b75ebb0c0bd99346a01cb255}This converts the weight supplied to a percentage score. The return value will be in the range 0 to 100, and will be 0 if and only if the item did not match the query at all. \hypertarget{classXapian_1_1MSet_fdd5c88361d0b83fc007a0aef92363b9}{\index{Xapian::MSet@{Xapian::MSet}!empty@{empty}}\index{empty@{empty}!Xapian::MSet@{Xapian::MSet}}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -