From ec3dbb40921a9e0076ae65035ade87cfde726cfb Mon Sep 17 00:00:00 2001 From: "\"Jean-Francois Dockes ext:(%22)" Date: Tue, 21 Aug 2012 08:38:23 +0200 Subject: [PATCH] comments --- src/index/fetcher.h | 25 +++++++++++++++---------- src/internfile/mh_exec.h | 1 - src/query/plaintorich.cpp | 12 ++++++++---- src/sampleconf/mimeconf | 10 ++++++---- src/sampleconf/mimemap | 4 ++-- 5 files changed, 31 insertions(+), 21 deletions(-) diff --git a/src/index/fetcher.h b/src/index/fetcher.h index 69e158f1..8ac83544 100644 --- a/src/index/fetcher.h +++ b/src/index/fetcher.h @@ -25,17 +25,22 @@ class RclConfig; /** - * Definition for a generic method to retrieve the data - * for a document designated by its index data (udi/ipath/url). - * This is used to retrieve the data for previewing. The - * actual implementation is specific to the kind of backend (file - * system, beagle cache, others in the future ?), and of course may - * share code with the indexing-time functions from the specific backend. + * Generic interface to retrieve the data for a document designated by + * its index data (udi/ipath/url). This is used to retrieve the data + * for previewing. The actual implementation is specific to the kind + * of backend (file system, beagle cache, others?...), and the + * implementation may of course may share code with the indexing-time + * functions from the specific backend. + * + * This is used to give access the raw document container (either as a + * file or as a memory block). The Internfile code will then further + * process it to get to the actual document, especially if + * de-embedding is involved. */ class DocFetcher { public: - /** A RawDoc is the data for a source document either as a memory - block, or pointed to by a file name */ + /** A RawDoc is the data for a document-holding entity either as a + memory block, or pointed to by a file name */ struct RawDoc { enum RawDocKind {RDK_FILENAME, RDK_DATA}; RawDocKind kind; @@ -55,7 +60,7 @@ public: /** * Return the signature for the requested document. This is used for - * up-to-date tests performed out of indexing (e.g.: verifying that a + * up-to-date tests performed when not indexing (e.g.: verifying that a * document is not stale before previewing it). * @param cnf the global config * @param idoc the data gathered from the index for this doc (udi/ipath) @@ -65,7 +70,7 @@ public: virtual ~DocFetcher() {} }; -/** Returns an appropriate fetcher object given the backend string identifier */ +/** Return an appropriate fetcher object given the backend string identifier */ DocFetcher *docFetcherMake(const Rcl::Doc& idoc); #endif /* _FETCHER_H_INCLUDED_ */ diff --git a/src/internfile/mh_exec.h b/src/internfile/mh_exec.h index 0b043c71..41ba6b78 100644 --- a/src/internfile/mh_exec.h +++ b/src/internfile/mh_exec.h @@ -59,7 +59,6 @@ class MimeHandlerExec : public RecollFilter { MimeHandlerExec(RclConfig *cnf, const string& mt) : RecollFilter(cnf, mt), missingHelper(false) {} - virtual ~MimeHandlerExec() {} virtual bool set_document_file(const string &file_path) { RecollFilter::set_document_file(file_path); m_fn = file_path; diff --git a/src/query/plaintorich.cpp b/src/query/plaintorich.cpp index 8cb45ad7..a99018fb 100644 --- a/src/query/plaintorich.cpp +++ b/src/query/plaintorich.cpp @@ -156,8 +156,10 @@ class VecIntCmpShorter { #define SETMINMAX(POS, STA, STO) {if ((POS) < (STA)) (STA) = (POS); \ if ((POS) > (STO)) (STO) = (POS);} -// Recursively check that each term is inside the window (which is -// readjusted as the successive terms are found). +// Check that at least an entry from the first position list is inside +// the window and recurse on next list. The window is readjusted as +// the successive terms are found. +// // @param window the search window width // @param plists the position list vector // @param i the position list to process (we then recurse with the next list) @@ -182,7 +184,9 @@ static bool do_proximity_test(int window, vector* >& plists, while (it != plists[i]->end() && *it < tmp) it++; - // Try each position inside window in turn for match with other lists + // Look for position inside window. If not found, no match. If + // found: if this is the last list we're done, else recurse on + // next list after adjusting the window while (it != plists[i]->end()) { int pos = *it; if (pos > min + window - 1) @@ -282,7 +286,7 @@ bool TextSplitPTR::matchGroup(unsigned int grpidx) LOGDEB(("matchGroup: no bpos found for %d or %d\n", sta, sto)); } } else { - LOGDEB0(("matchGroup: no group match found at this position\n")); + LOGDEB1(("matchGroup: no group match found at this position\n")); } } diff --git a/src/sampleconf/mimeconf b/src/sampleconf/mimeconf index f2b503ef..d0011916 100644 --- a/src/sampleconf/mimeconf +++ b/src/sampleconf/mimeconf @@ -1,14 +1,16 @@ -# @(#$Id: mimeconf,v 1.48 2008-11-27 13:35:24 dockes Exp $ (C) 2004 J.F.Dockes +# (C) 2004 J.F.Dockes -# Recoll : associations of mime types to processing filters. -# There are different sections for decompression, 'interning' for indexing -# and preview, and external viewers +# Associations of mime types to processing filters ([index] section). +# Other sections describe auxiliary properties associated to the mime types. ## ####################################### # Decompression: these types need a first pass to create a temp file to # work with. We use a script because uncompress utilities usually work in # place, which is not suitable. # +# Obviously this should be in a [decompress] section or such, but it was once +# forgotten and remained global for compatibility... +# # The %t parameter will be substituted to the name of a temporary directory # by recoll. This directory is guaranteed empty when calling the filter # diff --git a/src/sampleconf/mimemap b/src/sampleconf/mimemap index 231568c1..cbbb0d2a 100644 --- a/src/sampleconf/mimemap +++ b/src/sampleconf/mimemap @@ -1,5 +1,5 @@ -# @(#$Id: mimemap,v 1.32 2008-09-15 08:03:37 dockes Exp $ (C) 2004 J.F.Dockes -# Recoll: associations of file name extensions to mime types +# (C) 2004 J.F.Dockes +# Associations of file name extensions to mime types .txt = text/plain .text = text/plain