From 4c598573882c5ab02fefb135f743b11dcc702724 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Sat, 28 May 2016 08:30:25 +0200 Subject: [PATCH] added %x to print the xapian docid --- src/query/reslistpager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/query/reslistpager.cpp b/src/query/reslistpager.cpp index 7468a5ab..af23a5da 100644 --- a/src/query/reslistpager.cpp +++ b/src/query/reslistpager.cpp @@ -283,6 +283,9 @@ void ResListPager::displayDoc(RclConfig *config, int i, Rcl::Doc& doc, else chunk << "

"; + char xdocidbuf[100]; + sprintf(xdocidbuf, "%lu", doc.xdocid); + // Configurable stuff map subs; subs["A"] = !richabst.empty() ? richabst : ""; @@ -302,7 +305,8 @@ void ResListPager::displayDoc(RclConfig *config, int i, Rcl::Doc& doc, subs["t"] = maybeEscapeHtml(doc.meta[Rcl::Doc::keytt]); subs["U"] = url; subs["u"] = urlOrLocal; - + subs["x"] = xdocidbuf; + // Let %(xx) access all metadata. HTML-neuter everything: for (map::iterator it = doc.meta.begin(); it != doc.meta.end(); it++) {