Improving APIDOX search

Pau Garcia i Quiles pgquiles at elpauer.org
Sat Jan 5 03:41:54 CET 2008


Hello,

I think the search engine for documentation in api.kde.org needs some love.

Currently, when you click on a module (say, kdelibs), then on  
"Search", the only thing that works is typing down the exact name for  
the class and it will redirect you to the class docs. Multiple results  
are not allowed, it's not possible to use *, ?, etc to search and it's  
not possible to search in method names (the LXR overcomes those  
limitations but it's ugly to work with).

I've hacked a few improvements here and there: classmapper.php,  
genclassmapper.php and a new script called gencomponentmapper.php. I'm  
attaching them all and the createdocs.sh script I use to generate the  
documentation. What's new:
- You can now use regular expressions in the class names (for instance  
'k.*config')
- Multiple results are shown
- The component (KDECore, KDEUI, etc) to which the class belongs is shown

I know the output could be improved with a link to the module  
(kdelibs), but that's probably not important right now.

ATM I'm only generating docs for kdelibs and have not tried with other  
modules.

Now, I was going to implement search in method names when I noticed  
Doxygen as a SEARCHENGINE option which is disabled by default in  
KDE/kdelibs/doc/common/Doxyfile.global. I've tried enabling it and the  
search engine looks quite good (the Mainpage.dox files need  
modifications to show the search form). Is there any reason why  
SEARCHENGINE is disabled by default? If it could be enabled, it'd give  
us class and methods search for each component in each module for  
free. It might be interesting to try to combine all those indices in a  
single one and have a global search, not Google-dependant (the fact  
that the "global" search in api.kde.org goes to google makes it  
useless if you want to have you own local copy of the API docs, which  
was exactly what I was trying to do at my company).

Thank you.

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)



More information about the kde-quality mailing list