recollq: added option -p to be used with -A for showing page-numbered snippets instead of abstract
This commit is contained in:
+6
-10
@@ -40,11 +40,8 @@ enum abstract_result {
|
||||
class Snippet {
|
||||
public:
|
||||
Snippet(int page, const std::string& snip)
|
||||
: page(page), snippet(snip)
|
||||
{
|
||||
}
|
||||
Snippet& setTerm(const std::string& trm)
|
||||
{
|
||||
: page(page), snippet(snip) {}
|
||||
Snippet& setTerm(const std::string& trm) {
|
||||
term = trm;
|
||||
return *this;
|
||||
}
|
||||
@@ -65,6 +62,9 @@ public:
|
||||
Query(Db *db);
|
||||
~Query();
|
||||
|
||||
Query(const Query &) = delete;
|
||||
Query& operator=(const Query &) = delete;
|
||||
|
||||
/** Get explanation about last error */
|
||||
std::string getReason() const {
|
||||
return m_reason;
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
bool makeDocAbstract(const Doc &doc, std::vector<std::string>& abstract);
|
||||
// Returned as a vector of pair<page,snippet> page is 0 if unknown
|
||||
int makeDocAbstract(const Doc &doc, std::vector<Snippet>& abst,
|
||||
int maxoccs= -1, int ctxwords = -1, bool sortbypage=false);
|
||||
int maxoccs= -1, int ctxwords= -1,bool sortbypage=false);
|
||||
/** Retrieve page number for first match for "significant" query term
|
||||
* @param term returns the chosen term */
|
||||
int getFirstMatchPage(const Doc &doc, std::string& term);
|
||||
@@ -146,10 +146,6 @@ private:
|
||||
int m_resCnt;
|
||||
std::shared_ptr<SearchData> m_sd;
|
||||
int m_snipMaxPosWalk;
|
||||
|
||||
/* Copyconst and assignement private and forbidden */
|
||||
Query(const Query &) {}
|
||||
Query & operator=(const Query &) {return *this;};
|
||||
};
|
||||
|
||||
#ifndef NO_NAMESPACES
|
||||
|
||||
Reference in New Issue
Block a user