📄 classxapian_1_1boolweight.tex
字号:
\hypertarget{classXapian_1_1BoolWeight}{\section{Xapian::Bool\-Weight Class Reference}\label{classXapian_1_1BoolWeight}\index{Xapian::BoolWeight@{Xapian::BoolWeight}}}Boolean weighting scheme (everything gets 0). {\tt \#include $<$enquire.h$>$}Inheritance diagram for Xapian::Bool\-Weight:\begin{figure}[H]\begin{center}\leavevmode\includegraphics[width=72pt]{classXapian_1_1BoolWeight__inherit__graph}\end{center}\end{figure}Collaboration diagram for Xapian::Bool\-Weight:\begin{figure}[H]\begin{center}\leavevmode\includegraphics[width=72pt]{classXapian_1_1BoolWeight__coll__graph}\end{center}\end{figure}\subsection*{Public Member Functions}\begin{CompactItemize}\item \hyperlink{classXapian_1_1BoolWeight}{Bool\-Weight} $\ast$ \hyperlink{classXapian_1_1BoolWeight_cf501bcf0ff0292f1a8e92f5f1f4fb1e}{clone} () const \begin{CompactList}\small\item\em Return a new weight object of this type. \item\end{CompactList}\item std::string \hyperlink{classXapian_1_1BoolWeight_c91b3673317ee9574dff4321482f579d}{name} () const \begin{CompactList}\small\item\em Name of the weighting scheme. \item\end{CompactList}\item std::string \hyperlink{classXapian_1_1BoolWeight_06e88787161cc2146511259d5742dd10}{serialise} () const \begin{CompactList}\small\item\em Serialise object parameters into a string. \item\end{CompactList}\item \hyperlink{classXapian_1_1BoolWeight}{Bool\-Weight} $\ast$ \hyperlink{classXapian_1_1BoolWeight_563504a9f0a55ad298ca23ecb588b88e}{unserialise} (const std::string \&) const \begin{CompactList}\small\item\em Create object given string serialisation returned by \hyperlink{classXapian_1_1BoolWeight_06e88787161cc2146511259d5742dd10}{serialise()}. \item\end{CompactList}\item \hyperlink{types_8h_167860ee249b702eb746dca0d245f808}{Xapian::weight} \hyperlink{classXapian_1_1BoolWeight_24a1cbfea74c21c0b7db6bd54d3d2028}{get\_\-sumpart} (\hyperlink{types_8h_6979d98ebbe67186bd31e5ee2a7585cb}{Xapian::termcount}, \hyperlink{types_8h_7272583216038f810105df7dc927723c}{Xapian::doclength}) const \begin{CompactList}\small\item\em Get a weight which is part of the sum over terms being performed. \item\end{CompactList}\item \hyperlink{types_8h_167860ee249b702eb746dca0d245f808}{Xapian::weight} \hyperlink{classXapian_1_1BoolWeight_9edd11c7c0c6d3fc72c347f1bd65bb3c}{get\_\-maxpart} () const \begin{CompactList}\small\item\em Gets the maximum value that \hyperlink{classXapian_1_1BoolWeight_24a1cbfea74c21c0b7db6bd54d3d2028}{get\_\-sumpart()} may return. \item\end{CompactList}\item \hyperlink{types_8h_167860ee249b702eb746dca0d245f808}{Xapian::weight} \hyperlink{classXapian_1_1BoolWeight_5ec8d8a951450a758d9b5ea74fefcb09}{get\_\-sumextra} (\hyperlink{types_8h_7272583216038f810105df7dc927723c}{Xapian::doclength}) const \begin{CompactList}\small\item\em Get an extra weight for a document to add to the sum calculated over the query terms. \item\end{CompactList}\item \hyperlink{types_8h_167860ee249b702eb746dca0d245f808}{Xapian::weight} \hyperlink{classXapian_1_1BoolWeight_8332b9fa9cb900d273f8077f76c94fcc}{get\_\-maxextra} () const \begin{CompactList}\small\item\em Gets the maximum value that \hyperlink{classXapian_1_1BoolWeight_5ec8d8a951450a758d9b5ea74fefcb09}{get\_\-sumextra()} may return. \item\end{CompactList}\item bool \hyperlink{classXapian_1_1BoolWeight_6509a1b0a46dc2e37dcbd786626de8e6}{get\_\-sumpart\_\-needs\_\-doclength} () const \begin{CompactList}\small\item\em return false if the weight object doesn't need doclength \item\end{CompactList}\end{CompactItemize}\subsection{Detailed Description}Boolean weighting scheme (everything gets 0). \subsection{Member Function Documentation}\hypertarget{classXapian_1_1BoolWeight_cf501bcf0ff0292f1a8e92f5f1f4fb1e}{\index{Xapian::BoolWeight@{Xapian::Bool\-Weight}!clone@{clone}}\index{clone@{clone}!Xapian::BoolWeight@{Xapian::Bool\-Weight}}\subsubsection[clone]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{classXapian_1_1BoolWeight}{Bool\-Weight}$\ast$ Xapian::Bool\-Weight::clone () const\hspace{0.3cm}{\tt \mbox{[}inline, virtual\mbox{]}}}}\label{classXapian_1_1BoolWeight_cf501bcf0ff0292f1a8e92f5f1f4fb1e}Return a new weight object of this type. A subclass called Foo\-Weight taking parameters param1 and param2 should implement this as:virtual Foo\-Weight $\ast$ \hyperlink{classXapian_1_1BoolWeight_cf501bcf0ff0292f1a8e92f5f1f4fb1e}{clone() const} \{ return new Foo\-Weight(param1, param2); \} Implements \hyperlink{classXapian_1_1Weight}{Xapian::Weight}.\hypertarget{classXapian_1_1BoolWeight_8332b9fa9cb900d273f8077f76c94fcc}{\index{Xapian::BoolWeight@{Xapian::Bool\-Weight}!get_maxextra@{get\_\-maxextra}}\index{get_maxextra@{get\_\-maxextra}!Xapian::BoolWeight@{Xapian::Bool\-Weight}}\subsubsection[get\_\-maxextra]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{types_8h_167860ee249b702eb746dca0d245f808}{Xapian::weight} Xapian::Bool\-Weight::get\_\-maxextra () const\hspace{0.3cm}{\tt \mbox{[}inline, virtual\mbox{]}}}}\label{classXapian_1_1BoolWeight_8332b9fa9cb900d273f8077f76c94fcc}Gets the maximum value that \hyperlink{classXapian_1_1BoolWeight_5ec8d8a951450a758d9b5ea74fefcb09}{get\_\-sumextra()} may return. This is used in optimising searches. Implements \hyperlink{classXapian_1_1Weight_ca641ecc2f5645666820f864d243f46d}{Xapian::Weight}.\hypertarget{classXapian_1_1BoolWeight_9edd11c7c0c6d3fc72c347f1bd65bb3c}{\index{Xapian::BoolWeight@{Xapian::Bool\-Weight}!get_maxpart@{get\_\-maxpart}}\index{get_maxpart@{get\_\-maxpart}!Xapian::BoolWeight@{Xapian::Bool\-Weight}}\subsubsection[get\_\-maxpart]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{types_8h_167860ee249b702eb746dca0d245f808}{Xapian::weight} Xapian::Bool\-Weight::get\_\-maxpart () const\hspace{0.3cm}{\tt \mbox{[}inline, virtual\mbox{]}}}}\label{classXapian_1_1BoolWeight_9edd11c7c0c6d3fc72c347f1bd65bb3c}Gets the maximum value that \hyperlink{classXapian_1_1BoolWeight_24a1cbfea74c21c0b7db6bd54d3d2028}{get\_\-sumpart()} may return. This is used in optimising searches, by having the postlist tree decay appropriately when parts of it can have limited, or no, further effect. Implements \hyperlink{classXapian_1_1Weight_f37e797fa12bb915f73b20b953a132b7}{Xapian::Weight}.\hypertarget{classXapian_1_1BoolWeight_5ec8d8a951450a758d9b5ea74fefcb09}{\index{Xapian::BoolWeight@{Xapian::Bool\-Weight}!get_sumextra@{get\_\-sumextra}}\index{get_sumextra@{get\_\-sumextra}!Xapian::BoolWeight@{Xapian::Bool\-Weight}}\subsubsection[get\_\-sumextra]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{types_8h_167860ee249b702eb746dca0d245f808}{Xapian::weight} Xapian::Bool\-Weight::get\_\-sumextra (\hyperlink{types_8h_7272583216038f810105df7dc927723c}{Xapian::doclength}) const\hspace{0.3cm}{\tt \mbox{[}inline, virtual\mbox{]}}}}\label{classXapian_1_1BoolWeight_5ec8d8a951450a758d9b5ea74fefcb09}Get an extra weight for a document to add to the sum calculated over the query terms. This returns a weight for a given document, and is used by some weighting schemes to account for influence such as document length.\begin{Desc}\item[Parameters:]\begin{description}\item[{\em len}]the (unnormalised) document length. \end{description}\end{Desc}Implements \hyperlink{classXapian_1_1Weight_5b39302405b8d10911b26d796ba3f430}{Xapian::Weight}.\hypertarget{classXapian_1_1BoolWeight_24a1cbfea74c21c0b7db6bd54d3d2028}{\index{Xapian::BoolWeight@{Xapian::Bool\-Weight}!get_sumpart@{get\_\-sumpart}}\index{get_sumpart@{get\_\-sumpart}!Xapian::BoolWeight@{Xapian::Bool\-Weight}}\subsubsection[get\_\-sumpart]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{types_8h_167860ee249b702eb746dca0d245f808}{Xapian::weight} Xapian::Bool\-Weight::get\_\-sumpart (\hyperlink{types_8h_6979d98ebbe67186bd31e5ee2a7585cb}{Xapian::termcount}, \hyperlink{types_8h_7272583216038f810105df7dc927723c}{Xapian::doclength}) const\hspace{0.3cm}{\tt \mbox{[}inline, virtual\mbox{]}}}}\label{classXapian_1_1BoolWeight_24a1cbfea74c21c0b7db6bd54d3d2028}Get a weight which is part of the sum over terms being performed. This returns a weight for a given term and document. These weights are summed to give a total weight for the document.\begin{Desc}\item[Parameters:]\begin{description}\item[{\em wdf}]the within document frequency of the term. \item[{\em len}]the (unnormalised) document length. \end{description}\end{Desc}Implements \hyperlink{classXapian_1_1Weight_cf94e6ef70e95adf04c70fee3f3c965b}{Xapian::Weight}.\hypertarget{classXapian_1_1BoolWeight_6509a1b0a46dc2e37dcbd786626de8e6}{\index{Xapian::BoolWeight@{Xapian::Bool\-Weight}!get_sumpart_needs_doclength@{get\_\-sumpart\_\-needs\_\-doclength}}\index{get_sumpart_needs_doclength@{get\_\-sumpart\_\-needs\_\-doclength}!Xapian::BoolWeight@{Xapian::Bool\-Weight}}\subsubsection[get\_\-sumpart\_\-needs\_\-doclength]{\setlength{\rightskip}{0pt plus 5cm}bool Xapian::Bool\-Weight::get\_\-sumpart\_\-needs\_\-doclength () const\hspace{0.3cm}{\tt \mbox{[}inline, virtual\mbox{]}}}}\label{classXapian_1_1BoolWeight_6509a1b0a46dc2e37dcbd786626de8e6}return false if the weight object doesn't need doclength Reimplemented from \hyperlink{classXapian_1_1Weight_11a52ff08a2277bb765d579bf0ab77d8}{Xapian::Weight}.\hypertarget{classXapian_1_1BoolWeight_c91b3673317ee9574dff4321482f579d}{\index{Xapian::BoolWeight@{Xapian::Bool\-Weight}!name@{name}}\index{name@{name}!Xapian::BoolWeight@{Xapian::Bool\-Weight}}\subsubsection[name]{\setlength{\rightskip}{0pt plus 5cm}std::string Xapian::Bool\-Weight::name () const\hspace{0.3cm}{\tt \mbox{[}inline, virtual\mbox{]}}}}\label{classXapian_1_1BoolWeight_c91b3673317ee9574dff4321482f579d}Name of the weighting scheme. If the subclass is called Foo\-Weight, this should return \char`\"{}Foo\char`\"{}. Implements \hyperlink{classXapian_1_1Weight_10f2a94ec786e68633012c41ecedc123}{Xapian::Weight}.\hypertarget{classXapian_1_1BoolWeight_06e88787161cc2146511259d5742dd10}{\index{Xapian::BoolWeight@{Xapian::Bool\-Weight}!serialise@{serialise}}\index{serialise@{serialise}!Xapian::BoolWeight@{Xapian::Bool\-Weight}}\subsubsection[serialise]{\setlength{\rightskip}{0pt plus 5cm}std::string Xapian::Bool\-Weight::serialise () const\hspace{0.3cm}{\tt \mbox{[}inline, virtual\mbox{]}}}}\label{classXapian_1_1BoolWeight_06e88787161cc2146511259d5742dd10}Serialise object parameters into a string. Implements \hyperlink{classXapian_1_1Weight_a395a7cb4abd4ae0a3acc8b7d2510620}{Xapian::Weight}.\hypertarget{classXapian_1_1BoolWeight_563504a9f0a55ad298ca23ecb588b88e}{\index{Xapian::BoolWeight@{Xapian::Bool\-Weight}!unserialise@{unserialise}}\index{unserialise@{unserialise}!Xapian::BoolWeight@{Xapian::Bool\-Weight}}\subsubsection[unserialise]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{classXapian_1_1BoolWeight}{Bool\-Weight}$\ast$ Xapian::Bool\-Weight::unserialise (const std::string \&) const\hspace{0.3cm}{\tt \mbox{[}inline, virtual\mbox{]}}}}\label{classXapian_1_1BoolWeight_563504a9f0a55ad298ca23ecb588b88e}Create object given string serialisation returned by \hyperlink{classXapian_1_1BoolWeight_06e88787161cc2146511259d5742dd10}{serialise()}. Implements \hyperlink{classXapian_1_1Weight_c7406de40d11ffa4ef044d641a458484}{Xapian::Weight}.The documentation for this class was generated from the following file:\begin{CompactItemize}\item include/xapian/\hyperlink{enquire_8h}{enquire.h}\end{CompactItemize}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -