summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuigi Toscano <luigi.toscano@tiscali.it>2016-11-09 00:18:09 (GMT)
committerLuigi Toscano <luigi.toscano@tiscali.it>2016-11-09 00:18:09 (GMT)
commit5c9ffc89f39b855432d3e6872d51d6ced0ca2bff (patch)
tree28dee6a3b61f30047d9318bbf20ba83aa275d0c5
parentf1f9684b71b14e91ab60c16f57593b64b65b9214 (diff)
Show part of the document ID for the pages found
Extract the relevant part of the document ID (without the name of the page) and show it before the name. The result of the man page indexer already follows this pattern. REVIEW: 129364
-rw-r--r--searchhandlers/xapiansearch.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/searchhandlers/xapiansearch.cpp b/searchhandlers/xapiansearch.cpp
index 83bdeb4..313904f 100644
--- a/searchhandlers/xapiansearch.cpp
+++ b/searchhandlers/xapiansearch.cpp
@@ -136,8 +136,10 @@ int main( int argc, char *argv[] )
const std::string html_id = slash != std::string::npos
? uid.substr( 0, slash + 1 ) + html
: html;
+ const std::string partial_id = html_id.substr(0, html_id.rfind("/"));
- std::cout << "<li><a href=\"help:/" << html_id << "\">" << title << "</a></li>" << std::endl;
+ std::cout << "<li><a href=\"help:/" << html_id << "\">" << partial_id
+ << " - " << title << "</a></li>" << std::endl;
}
std::cout << "</ul>" << std::endl;