📄 classxapian_1_1enquire.tex
字号:
\end{Desc}\begin{Desc}\item[Returns:]An \hyperlink{classXapian_1_1ESet}{ESet} object containing the results of the expand.\end{Desc}\begin{Desc}\item[Exceptions:]\begin{description}\item[{\em Xapian::Invalid\-Argument\-Error}]See class documentation. \end{description}\end{Desc}\hypertarget{classXapian_1_1Enquire_c04aa26eff82db9fd810b8125a31ee55}{\index{Xapian::Enquire@{Xapian::Enquire}!get_eset@{get\_\-eset}}\index{get_eset@{get\_\-eset}!Xapian::Enquire@{Xapian::Enquire}}\subsubsection[get\_\-eset]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{classXapian_1_1ESet}{ESet} Xapian::Enquire::get\_\-eset (\hyperlink{types_8h_6979d98ebbe67186bd31e5ee2a7585cb}{Xapian::termcount} {\em maxitems}, const \hyperlink{classXapian_1_1RSet}{RSet} \& {\em omrset}, int {\em flags} = {\tt 0}, double {\em k} = {\tt 1.0}, const \hyperlink{classXapian_1_1ExpandDecider}{Xapian::Expand\-Decider} $\ast$ {\em edecider} = {\tt 0}) const}}\label{classXapian_1_1Enquire_c04aa26eff82db9fd810b8125a31ee55}Get the expand set for the given rset. \begin{Desc}\item[Parameters:]\begin{description}\item[{\em maxitems}]the maximum number of items to return. \item[{\em omrset}]the relevance set to use when performing the expand operation. \item[{\em flags}]zero or more of these values $|$-ed together:\begin{itemize}\item Xapian::Enquire::include\_\-query\_\-terms query terms may be returned from expand\item Xapian::Enquire::use\_\-exact\_\-termfreq for multi dbs, calculate the exact termfreq; otherwise an approximation is used which can greatly improve efficiency, but still returns good results. \end{itemize}\item[{\em k}]the parameter k in the query expansion algorithm (default is 1.0) \item[{\em edecider}]a decision functor to use to decide whether a given term should be put in the \hyperlink{classXapian_1_1ESet}{ESet}\end{description}\end{Desc}\begin{Desc}\item[Returns:]An \hyperlink{classXapian_1_1ESet}{ESet} object containing the results of the expand.\end{Desc}\begin{Desc}\item[Exceptions:]\begin{description}\item[{\em Xapian::Invalid\-Argument\-Error}]See class documentation. \end{description}\end{Desc}\hypertarget{classXapian_1_1Enquire_4d531a494be857ae09c831480ff651d7}{\index{Xapian::Enquire@{Xapian::Enquire}!get_matching_terms_begin@{get\_\-matching\_\-terms\_\-begin}}\index{get_matching_terms_begin@{get\_\-matching\_\-terms\_\-begin}!Xapian::Enquire@{Xapian::Enquire}}\subsubsection[get\_\-matching\_\-terms\_\-begin]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{classXapian_1_1TermIterator}{Term\-Iterator} Xapian::Enquire::get\_\-matching\_\-terms\_\-begin (const \hyperlink{classXapian_1_1MSetIterator}{MSet\-Iterator} \& {\em it}) const}}\label{classXapian_1_1Enquire_4d531a494be857ae09c831480ff651d7}Get terms which match a given document, by match set item. This method returns the terms in the current query which match the given document.If the underlying database has suitable support, using this call (rather than passing a \hyperlink{types_8h_53073891e45d892a8d8a5d8f87f41402}{Xapian::docid}) will enable the system to ensure that the correct data is returned, and that the document has not been deleted or changed since the query was performed.\begin{Desc}\item[Parameters:]\begin{description}\item[{\em it}]The iterator for which to retrieve the matching terms.\end{description}\end{Desc}\begin{Desc}\item[Returns:]An iterator returning the terms which match the document. The terms will be returned (as far as this makes any sense) in the same order as the terms in the query. Terms will not occur more than once, even if they do in the query.\end{Desc}\begin{Desc}\item[Exceptions:]\begin{description}\item[{\em Xapian::Invalid\-Argument\-Error}]See class documentation. \item[{\em Xapian::Doc\-Not\-Found\-Error}]The document specified could not be found in the database. \end{description}\end{Desc}\hypertarget{classXapian_1_1Enquire_dda4181ccd15beb52c39f5e24adbb25b}{\index{Xapian::Enquire@{Xapian::Enquire}!get_matching_terms_begin@{get\_\-matching\_\-terms\_\-begin}}\index{get_matching_terms_begin@{get\_\-matching\_\-terms\_\-begin}!Xapian::Enquire@{Xapian::Enquire}}\subsubsection[get\_\-matching\_\-terms\_\-begin]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{classXapian_1_1TermIterator}{Term\-Iterator} Xapian::Enquire::get\_\-matching\_\-terms\_\-begin (\hyperlink{types_8h_53073891e45d892a8d8a5d8f87f41402}{Xapian::docid} {\em did}) const}}\label{classXapian_1_1Enquire_dda4181ccd15beb52c39f5e24adbb25b}Get terms which match a given document, by document id. This method returns the terms in the current query which match the given document.It is possible for the document to have been removed from the database between the time it is returned in an mset, and the time that this call is made. If possible, you should specify an \hyperlink{classXapian_1_1MSetIterator}{MSet\-Iterator} instead of a \hyperlink{types_8h_53073891e45d892a8d8a5d8f87f41402}{Xapian::docid}, since this will enable database backends with suitable support to prevent this occurring.Note that a query does not need to have been run in order to make this call.\begin{Desc}\item[Parameters:]\begin{description}\item[{\em did}]The document id for which to retrieve the matching terms.\end{description}\end{Desc}\begin{Desc}\item[Returns:]An iterator returning the terms which match the document. The terms will be returned (as far as this makes any sense) in the same order as the terms in the query. Terms will not occur more than once, even if they do in the query.\end{Desc}\begin{Desc}\item[Exceptions:]\begin{description}\item[{\em Xapian::Invalid\-Argument\-Error}]See class documentation. \item[{\em Xapian::Doc\-Not\-Found\-Error}]The document specified could not be found in the database. \end{description}\end{Desc}\hypertarget{classXapian_1_1Enquire_619e5a4f3597ed800e8f11190a5b7fe0}{\index{Xapian::Enquire@{Xapian::Enquire}!get_matching_terms_end@{get\_\-matching\_\-terms\_\-end}}\index{get_matching_terms_end@{get\_\-matching\_\-terms\_\-end}!Xapian::Enquire@{Xapian::Enquire}}\subsubsection[get\_\-matching\_\-terms\_\-end]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{classXapian_1_1TermIterator}{Term\-Iterator} Xapian::Enquire::get\_\-matching\_\-terms\_\-end (const \hyperlink{classXapian_1_1MSetIterator}{MSet\-Iterator} \&) const\hspace{0.3cm}{\tt \mbox{[}inline\mbox{]}}}}\label{classXapian_1_1Enquire_619e5a4f3597ed800e8f11190a5b7fe0}End iterator corresponding to \hyperlink{classXapian_1_1Enquire_dda4181ccd15beb52c39f5e24adbb25b}{get\_\-matching\_\-terms\_\-begin()}. \hypertarget{classXapian_1_1Enquire_6a27b926405ef71ab138fa656dab0bd4}{\index{Xapian::Enquire@{Xapian::Enquire}!get_matching_terms_end@{get\_\-matching\_\-terms\_\-end}}\index{get_matching_terms_end@{get\_\-matching\_\-terms\_\-end}!Xapian::Enquire@{Xapian::Enquire}}\subsubsection[get\_\-matching\_\-terms\_\-end]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{classXapian_1_1TermIterator}{Term\-Iterator} Xapian::Enquire::get\_\-matching\_\-terms\_\-end (\hyperlink{types_8h_53073891e45d892a8d8a5d8f87f41402}{Xapian::docid}) const\hspace{0.3cm}{\tt \mbox{[}inline\mbox{]}}}}\label{classXapian_1_1Enquire_6a27b926405ef71ab138fa656dab0bd4}End iterator corresponding to \hyperlink{classXapian_1_1Enquire_dda4181ccd15beb52c39f5e24adbb25b}{get\_\-matching\_\-terms\_\-begin()}. \hypertarget{classXapian_1_1Enquire_edb5fb761acc0bb2249bec375883a093}{\index{Xapian::Enquire@{Xapian::Enquire}!get_mset@{get\_\-mset}}\index{get_mset@{get\_\-mset}!Xapian::Enquire@{Xapian::Enquire}}\subsubsection[get\_\-mset]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{classXapian_1_1MSet}{MSet} Xapian::Enquire::get\_\-mset (\hyperlink{types_8h_b4166dca4ac15d88c933bbb8e0d55d23}{Xapian::doccount} {\em first}, \hyperlink{types_8h_b4166dca4ac15d88c933bbb8e0d55d23}{Xapian::doccount} {\em maxitems}, \hyperlink{types_8h_b4166dca4ac15d88c933bbb8e0d55d23}{Xapian::doccount} {\em checkatleast} = {\tt 0}, const \hyperlink{classXapian_1_1RSet}{RSet} $\ast$ {\em omrset} = {\tt 0}, const \hyperlink{classXapian_1_1MatchDecider}{Match\-Decider} $\ast$ {\em mdecider} = {\tt 0}) const}}\label{classXapian_1_1Enquire_edb5fb761acc0bb2249bec375883a093}Get (a portion of) the match set for the current query. \begin{Desc}\item[Parameters:]\begin{description}\item[{\em first}]the first item in the result set to return. A value of zero corresponds to the first item returned being that with the highest score. A value of 10 corresponds to the first 10 items being ignored, and the returned items starting at the eleventh. \item[{\em maxitems}]the maximum number of items to return. \item[{\em checkatleast}]the minimum number of items to check. Because the matcher optimises, it won't consider every document which might match, so the total number of matches is estimated. Setting checkatleast forces it to consider that many matches and so allows for reliable paging links. \item[{\em omrset}]the relevance set to use when performing the query. \item[{\em mdecider}]a decision functor to use to decide whether a given document should be put in the \hyperlink{classXapian_1_1MSet}{MSet}\end{description}\end{Desc}\begin{Desc}\item[Returns:]A \hyperlink{classXapian_1_1MSet}{Xapian::MSet} object containing the results of the query.\end{Desc}\begin{Desc}\item[Exceptions:]\begin{description}\item[{\em Xapian::Invalid\-Argument\-Error}]See class documentation. \end{description}\end{Desc}\hypertarget{classXapian_1_1Enquire_a526b0e563e20ea18a06d4033529208c}{\index{Xapian::Enquire@{Xapian::Enquire}!get_query@{get\_\-query}}\index{get_query@{get\_\-query}!Xapian::Enquire@{Xapian::Enquire}}\subsubsection[get\_\-query]{\setlength{\rightskip}{0pt plus 5cm}const \hyperlink{classXapian_1_1Query}{Xapian::Query}\& Xapian::Enquire::get\_\-query ()}}\label{classXapian_1_1Enquire_a526b0e563e20ea18a06d4033529208c}Get the query which has been set. This is only valid after \hyperlink{classXapian_1_1Enquire_1148d960120662e5543e2a2b12620318}{set\_\-query()} has been called.\begin{Desc}\item[Exceptions:]\begin{description}\item[{\em Xapian::Invalid\-Argument\-Error}]will be thrown if query has not yet been set. \end{description}\end{Desc}\hypertarget{classXapian_1_1Enquire_d206c52facbc0d9025129a7fcd83519e}{\index{Xapian::Enquire@{Xapian::Enquire}!register_match_decider@{register\_\-match\_\-decider}}\index{register_match_decider@{register\_\-match\_\-decider}!Xapian::Enquire@{Xapian::Enquire}}\subsubsection[register\_\-match\_\-decider]{\setlength{\rightskip}{0pt plus 5cm}void Xapian::Enquire::register\_\-match\_\-decider (const std::string \& {\em name}, const \hyperlink{classXapian_1_1MatchDecider}{Match\-Decider} $\ast$ {\em mdecider} = {\tt NULL})}}\label{classXapian_1_1Enquire_d206c52facbc0d9025129a7fcd83519e}Register a \hyperlink{classXapian_1_1MatchDecider}{Match\-Decider}. \begin{Desc}\item[Parameters:]\begin{description}\item[{\em name}]The name to register this matchdecider as. \item[{\em mdecider}]The matchdecider. If omitted, then remove any matchdecider registered with this name. \end{description}\end{Desc}\hypertarget{classXapian_1_1Enquire_271e074ce109e77e5486f51cb0c4e2d4}{\index{Xapian::Enquire@{Xapian::Enquire}!set_bias@{set\_\-bias}}\index{set_bias@{set\_\-bias}!Xapian::Enquire@{Xapian::Enquire}}\subsubsection[set\_\-bias]{\setlength{\rightskip}{0pt plus 5cm}void Xapian::Enquire::set\_\-bias (\hyperlink{types_8h_167860ee249b702eb746dca0d245f808}{Xapian::weight} {\em bias\_\-weight}, time\_\-t {\em bias\_\-halflife})}}\label{classXapian_1_1Enquire_271e074ce109e77e5486f51cb0c4e2d4}Set the bias functor parameters. NB this is a temporary API for this feature.\begin{Desc}\item[Parameters:]\begin{description}\item[{\em bias\_\-weight}]Maximum weight bias functor can add (and which is given to document with a time now or in the future).\item[{\em bias\_\-halflife}]the match bias decays exponentially as you go back in time. This sets the half-life of this decay in seconds (default 0 =$>$ no bias). \end{description}\end{Desc}\hypertarget{classXapian_1_1Enquire_b5ef9cc615f7dd8414175c7529ee4e0c}{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -