comments
This commit is contained in:
parent
2870274f80
commit
ec3dbb4092
@ -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_ */
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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<vector<int>* >& 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"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
#
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user