diff --git a/src/index/fsindexer.cpp b/src/index/fsindexer.cpp index a4319454..9c534b0f 100644 --- a/src/index/fsindexer.cpp +++ b/src/index/fsindexer.cpp @@ -727,10 +727,9 @@ FsIndexer::processonefile(RclConfig *config, if (doc.ipath.empty()) { if (!doc.peekmeta(Rcl::Doc::keyfn, &fnp) || fnp->empty()) doc.meta[Rcl::Doc::keyfn] = utf8fn; - } else { - // subdoc: set container file name - doc.meta[Rcl::Doc::keytcfn] = utf8fn; - } + } + // Set container file name for all docs, top or subdoc + doc.meta[Rcl::Doc::keytcfn] = utf8fn; char cbuf[100]; sprintf(cbuf, "%lld", (long long)stp->st_size); @@ -815,7 +814,8 @@ FsIndexer::processonefile(RclConfig *config, fileDoc.onlyxattr = true; } else { fileDoc.fmtime = ascdate; - fileDoc.meta[Rcl::Doc::keyfn] = utf8fn; + fileDoc.meta[Rcl::Doc::keyfn] = + fileDoc.meta[Rcl::Doc::keytcfn] = utf8fn; fileDoc.haschildren = true; fileDoc.mimetype = mimetype; fileDoc.url = cstr_fileu + fn; diff --git a/src/rcldb/rcldoc.cpp b/src/rcldb/rcldoc.cpp index efcb4cc5..2dcaa05f 100644 --- a/src/rcldb/rcldoc.cpp +++ b/src/rcldb/rcldoc.cpp @@ -30,7 +30,7 @@ namespace Rcl { const string Doc::keyds("dbytes"); const string Doc::keyfmt("fmtime"); const string Doc::keyfn("filename"); - const string Doc::keytcfn("topcontainerfn"); + const string Doc::keytcfn("containerfilename"); const string Doc::keyfs("fbytes"); const string Doc::keyipt("ipath"); const string Doc::keykw("keywords"); diff --git a/src/sampleconf/fields b/src/sampleconf/fields index 6780e136..4dc3624e 100644 --- a/src/sampleconf/fields +++ b/src/sampleconf/fields @@ -48,6 +48,7 @@ rclmd5 = XM dir = XP abstract = XS filename = XSFN +containerfilename = XCFN ; pfxonly = 1 rclUnsplitFN = XSFS xapyear = Y recipient = XTO @@ -115,6 +116,7 @@ url = dc:identifier xesam:url # (e.g. an HTML meta field) and index it. [queryaliases] #filename = fn +#containerfilename = cfn [xattrtofields] ######################