Bug 158633 - Searching Application Manuals returns khc_htsearch.pl command not search results
Summary: Searching Application Manuals returns khc_htsearch.pl command not search results
Status: RESOLVED FIXED
Alias: None
Product: khelpcenter
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Documentation Editorial Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-01 17:35 UTC by usnay12345
Modified: 2016-03-12 23:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description usnay12345 2008-03-01 17:35:43 UTC
Version:           3.5.8-19.fc8 Fedora (using 3.5.8-19.fc8 Fedora, Fedora release 8 (Werewolf))
Compiler:          Target: i386-redhat-linux
OS:                Linux (i686) release 2.6.23.15-137.fc8

- Open Konqueror.
- From Help menu, click Konqueror Handbook.
   KDE Help Center opens.
- If you have not already done so, build a search index.
- Enter a search term, for example 'inverted' in the search entry field (do not enter the quotes).
- Ensure that Application Manuals is checked, in the Scope list.  It does not matter whether any other scopes are checked or not.
- Press the Search button.
- khelpcenter displays:
----------------------------------
Search Results for 'inverted':
Top-Level Documentation
Application Manuals
khc_htsearch.pl --docbook --indexdir=/home/htest/.kde/share/apps/khelpcenter/index/ --config=kde_application_manuals --words=inverted --method=and --maxnum=5 --lang=en
----------------------------------

Expected results:
Search hits for "inverted".
For example, in the Konqueror Handbook, chapter 3 ("Konqueror the File Manager"), is the text "simple inverted tree structure", so a hit should be reported for this topic.

Opening KDE Help Center via the Help item on the K menu produces the same results as opening it from an application.

This failure occurs for all searches.
Comment 1 Emmanuel Dumont 2008-12-05 17:18:49 UTC
Version:  3.5.4-16.el5.centos CentOS
Machine: x86_64
OS: Linux (i686) release 2.6.18-92.1.18.el5 

J had the same problem, with help center able to build the search index, but not able to find any results in the Application Manuals (works ok for UNIX man pages though). After digging a bit, I found the cause of the problem:
the perl script /usr/bin/khc_htsearch.pl used to search has the wrong path for htdig, ie /var/www/cgi-bin/htsearch while htsearch is located at /usr/bin/htsearch on my system.
I've tested it on the command line and now I have some results.
Hope it will help.


Comment 2 Pino Toscano 2016-03-12 23:06:10 UTC
Git commit 583ed246c75ce2c686957b6e1dc34aaed31206b4 by Pino Toscano.
Committed on 12/03/2016 at 23:01.
Pushed by pino into branch 'master'.

Add Xapian support for indexing and searching

Start using Xapian for indexing and searching the documentation: it
works much better than htp://dig, it provides a C++ API, and it is well
maintained.

Introduce two helper tools to create/update an index, and search on it,
starting from the cache.bz2 files generated by meinproc: this way it is
possible to index the whole text, with the entities already expanded
(something which would not be there when parsing the docbook files
directly). Make use of libxml2 to parse the HTML documents, and get all
the text in them.

Xapian and libxml2 are currently considered as mandatory dependencies:
they are portable, generally available everywhere, and not requiring
themselves too many extra dependencies.
Related: bug 126710, bug 93664, bug 103266, bug 115935, bug 122437, bug 125276, bug 152671, bug 209415, bug 256397, bug 266290

M  +13   -0    CMakeLists.txt
M  +35   -0    searchhandlers/CMakeLists.txt
A  +134  -0    searchhandlers/cachereader.cpp     [License: GPL (v2+)]
A  +49   -0    searchhandlers/cachereader.h     [License: GPL (v2+)]
A  +107  -0    searchhandlers/htmltextdump.cpp     [License: GPL (v2+)]
A  +29   -0    searchhandlers/htmltextdump.h     [License: GPL (v2+)]
A  +5    -0    searchhandlers/xapian.desktop.cmake
A  +126  -0    searchhandlers/xapiancommon.cpp     [License: GPL (v2+)]
A  +50   -0    searchhandlers/xapiancommon.h     [License: GPL (v2+)]
A  +269  -0    searchhandlers/xapianindexer.cpp     [License: GPL (v2+)]
A  +151  -0    searchhandlers/xapiansearch.cpp     [License: GPL (v2+)]

http://commits.kde.org/khelpcenter/583ed246c75ce2c686957b6e1dc34aaed31206b4
Comment 3 Pino Toscano 2016-03-12 23:26:43 UTC
Git commit 163133768d77ae16e36b31d1174d6c60d53cfdce by Pino Toscano.
Committed on 12/03/2016 at 23:01.
Pushed by pino into branch 'master'.

Remove the ht://dig support

ht://dig is basically unmantained for the past decade, and its
integration in khelpcenter has always been a sort of hack (execute
a CGI, and print its resulting HTML text).

Since Xapian is used as better solution, all of the htp://dig
supporting code can be removed completely.
Related: bug 122437, bug 125276, bug 152671, bug 209415, bug 244091, bug 255384, bug 256397, bug 277464, bug 103266, bug 112958

M  +0    -2    CMakeLists.txt
D  +0    -14   README.htdig
M  +0    -14   doc/khelpcenter/index.docbook
M  +0    -9    docmetainfo.cpp
M  +0    -3    docmetainfo.h
D  +0    -61   htmlsearch.cpp
D  +0    -51   htmlsearch.h
D  +0    -47   htmlsearch/CMakeLists.txt
D  +0    -5    htmlsearch/Messages.sh
D  +0    -23   htmlsearch/checked.xpm
D  +0    -470  htmlsearch/htmlsearch.cpp
D  +0    -254  htmlsearch/htmlsearch.desktop
D  +0    -62   htmlsearch/htmlsearch.h
D  +0    -25   htmlsearch/index.cpp
D  +0    -371  htmlsearch/kcmhtmlsearch.cpp
D  +0    -84   htmlsearch/kcmhtmlsearch.h
D  +0    -52   htmlsearch/klangcombo.cpp
D  +0    -47   htmlsearch/klangcombo.h
D  +0    -246  htmlsearch/ktagcombobox.cpp
D  +0    -92   htmlsearch/ktagcombobox.h
D  +0    -6    htmlsearch/long.html
D  +0    -4    htmlsearch/meinproc_wrapper
D  +0    -21   htmlsearch/nomatch.html
D  +0    -89   htmlsearch/progressdialog.cpp
D  +0    -32   htmlsearch/progressdialog.h
D  +0    -1    htmlsearch/short.html
D  +-    --    htmlsearch/star.png
D  +-    --    htmlsearch/star_blank.png
D  +0    -19   htmlsearch/syntax.html
D  +0    -22   htmlsearch/unchecked.xpm
D  +0    -16   htmlsearch/wrapper.html
D  +0    -156  htmlsearchconfig.cpp
D  +0    -58   htmlsearchconfig.h
M  +0    -1    kcmhelpcenter.cpp
M  +0    -2    kcmhelpcenter.h
M  +2    -14   searchhandlers/CMakeLists.txt
D  +0    -8    searchhandlers/docbook.desktop.cmake
D  +0    -8    searchhandlers/htdig.desktop.cmake
D  +0    -2    searchhandlers/htdig_long.html
D  +0    -222  searchhandlers/khc_docbookdig.pl.cmake
D  +0    -148  searchhandlers/khc_htdig.pl.cmake
D  +0    -117  searchhandlers/khc_htsearch.pl
M  +1    -2    tests/CMakeLists.txt

http://commits.kde.org/khelpcenter/163133768d77ae16e36b31d1174d6c60d53cfdce