Blame doc/searching.doc

Packit Service 50c9f2
/******************************************************************************
Packit Service 50c9f2
 *
Packit Service 50c9f2
 * 
Packit Service 50c9f2
 *
Packit Service 50c9f2
 * Copyright (C) 1997-2015 by Dimitri van Heesch.
Packit Service 50c9f2
 *
Packit Service 50c9f2
 * Permission to use, copy, modify, and distribute this software and its
Packit Service 50c9f2
 * documentation under the terms of the GNU General Public License is hereby 
Packit Service 50c9f2
 * granted. No representations are made about the suitability of this software 
Packit Service 50c9f2
 * for any purpose. It is provided "as is" without express or implied warranty.
Packit Service 50c9f2
 * See the GNU General Public License for more details.
Packit Service 50c9f2
 *
Packit Service 50c9f2
 * Documents produced by Doxygen are derivative works derived from the
Packit Service 50c9f2
 * input used in their production; they are not affected by this license.
Packit Service 50c9f2
 *
Packit Service 50c9f2
 */
Packit Service 50c9f2
/*! \page searching Searching
Packit Service 50c9f2
Packit Service 50c9f2
Doxygen indexes your source code in various ways to make it easier 
Packit Service 50c9f2
to navigate and find what you are looking for. 
Packit Service 50c9f2
There are also situations however where you want to
Packit Service 50c9f2
search for something by keyword rather than browse for it.
Packit Service 50c9f2
Packit Service 50c9f2
HTML browsers by default have no search capabilities that work across multiple
Packit Service 50c9f2
pages, so either doxygen or external tools need to help to facilitate 
Packit Service 50c9f2
this feature.
Packit Service 50c9f2
Packit Service 50c9f2
Doxygen has 7 different ways to add searching to the HTML output, each of which
Packit Service 50c9f2
has its own advantages and disadvantages:
Packit Service 50c9f2
Packit Service 50c9f2

1. Client side searching

Packit Service 50c9f2
   The easiest way to enable searching is to enable the built-in client
Packit Service 50c9f2
   side search engine. This engine is implemented using Javascript and DHTML
Packit Service 50c9f2
   only and runs entirely on the clients browser. So no additional tooling is
Packit Service 50c9f2
   required to make it work. 
Packit Service 50c9f2
 
Packit Service 50c9f2
   To enable it set 
Packit Service 50c9f2
   \ref cfg_searchengine "SEARCHENGINE" to \c YES in the config file
Packit Service 50c9f2
   and make sure \ref cfg_server_based_search "SERVER_BASED_SEARCH" is set
Packit Service 50c9f2
   to \c NO.
Packit Service 50c9f2
Packit Service 50c9f2
   An additional advantage of this method is that it provides live 
Packit Service 50c9f2
   searching, i.e. the search results are presented and adapted as you type.
Packit Service 50c9f2
Packit Service 50c9f2
   This method also has its drawbacks: it is limited to searching for symbols
Packit Service 50c9f2
   only. It does not provide full text search capabilities, and it does not
Packit Service 50c9f2
   scale well to very large projects (then searching becomes very slow).
Packit Service 50c9f2
Packit Service 50c9f2

2. Server side searching

Packit Service 50c9f2
   If you plan to put the HTML documentation on a web server, and that
Packit Service 50c9f2
   web server has the capability to process PHP code, then you can also use 
Packit Service 50c9f2
   doxygen's built-in server side search engine. 
Packit Service 50c9f2
Packit Service 50c9f2
   To enable this set both
Packit Service 50c9f2
   \ref cfg_searchengine "SEARCHENGINE" and 
Packit Service 50c9f2
   \ref cfg_server_based_search "SERVER_BASED_SEARCH" to \c YES in the config
Packit Service 50c9f2
   file and set \ref cfg_external_search "EXTERNAL_SEARCH" to \c NO.
Packit Service 50c9f2
Packit Service 50c9f2
   Advantages over the client side search engine are that it provides full
Packit Service 50c9f2
   text search and it scales well to medium side projects.
Packit Service 50c9f2
Packit Service 50c9f2
   Disadvantages are that it does not work locally (i.e. using a "file://" URL)
Packit Service 50c9f2
   and that it does not provide live search capabilities.
Packit Service 50c9f2
Packit Service 50c9f2
   @note In the future this option will probably be replaced by the next 
Packit Service 50c9f2
   search option.
Packit Service 50c9f2
Packit Service 50c9f2

3. Server side searching with external indexing

Packit Service 50c9f2
   With release 1.8.3 of doxygen, another server based search option has
Packit Service 50c9f2
   been added. With this option doxygen generates the raw data that can be 
Packit Service 50c9f2
   searched and leaves it up to external tools to do the indexing and 
Packit Service 50c9f2
   searching, meaning that you could use your own indexer and search engine 
Packit Service 50c9f2
   of choice. To make life easier doxygen ships with an example indexer 
Packit Service 50c9f2
   (doxyindexer) and search engine (doxysearch.cgi) based on 
Packit Service 50c9f2
   the Xapian open source search engine 
Packit Service 50c9f2
   library.
Packit Service 50c9f2
Packit Service 50c9f2
   To enable this search method set 
Packit Service 50c9f2
   \ref cfg_searchengine "SEARCHENGINE",
Packit Service 50c9f2
   \ref cfg_server_based_search "SERVER_BASED_SEARCH" and
Packit Service 50c9f2
   \ref cfg_external_search "EXTERNAL_SEARCH" all to \c YES.
Packit Service 50c9f2
Packit Service 50c9f2
   See \subpage extsearch for configuration details.
Packit Service 50c9f2
Packit Service 50c9f2
   Advantages over option 2 are that this method (potentially) scales to 
Packit Service 50c9f2
   very large projects. It is also possible to combine multiple doxygen 
Packit Service 50c9f2
   projects and external data into one search index. 
Packit Service 50c9f2
   The way the interaction with the search engine is done, makes it 
Packit Service 50c9f2
   possible to search from local HTML pages. Also the search results have 
Packit Service 50c9f2
   better ranking and show context information (if available).
Packit Service 50c9f2
Packit Service 50c9f2
   Disadvantages are that is requires a web server that can execute a CGI
Packit Service 50c9f2
   binary, and an additional indexing step after running doxygen.
Packit Service 50c9f2
Packit Service 50c9f2

4. Windows Compiled HTML Help

Packit Service 50c9f2
   If you are running doxygen on Windows, then you can make a 
Packit Service 50c9f2
   compiled HTML Help file (.chm) out of the HTML files produced by doxygen.
Packit Service 50c9f2
   This is a single file containing all HTML files and it also includes a
Packit Service 50c9f2
   search index. There are viewers for this format on many platforms,
Packit Service 50c9f2
   and Windows even supports it natively.
Packit Service 50c9f2
Packit Service 50c9f2
   To enable this set \ref cfg_generate_htmlhelp "GENERATE_HTMLHELP" to \c YES
Packit Service 50c9f2
   in the config file. To let doxygen compile the HTML Help file for you,
Packit Service 50c9f2
   you also need to specify the path to the HTML compiler (hhc.exe) using the
Packit Service 50c9f2
   \ref cfg_hhc_location "HHC_LOCATION" config option and the name of the
Packit Service 50c9f2
   resulting CHM file using \ref cfg_chm_file "CHM_FILE".
Packit Service 50c9f2
   
Packit Service 50c9f2
   An advantage of this method is that the result is a single file that can
Packit Service 50c9f2
   easily be distributed. It also provides full text search. 
Packit Service 50c9f2
   
Packit Service 50c9f2
   Disadvantages are that compiling the CHM file only works on Windows
Packit Service 50c9f2
   and requires Microsoft's HTML compiler, which is not very actively supported
Packit Service 50c9f2
   by Microsoft. Although the tool works fine for most people, it can 
Packit Service 50c9f2
   sometimes crash for no apparent reason (how typical). 
Packit Service 50c9f2
Packit Service 50c9f2

5. Mac OS X Doc Sets

Packit Service 50c9f2
   If you are running doxygen on Mac OS X 10.5 or higher, 
Packit Service 50c9f2
   then you can make a "doc set" out of the HTML files produced by doxygen.
Packit Service 50c9f2
   A doc set consists of a single directory with a special structure 
Packit Service 50c9f2
   containing the HTML files along with a precompiled search index. 
Packit Service 50c9f2
   A doc set can be embedded in Xcode (the integrated development environment 
Packit Service 50c9f2
   provided by Apple).
Packit Service 50c9f2
Packit Service 50c9f2
   To enable the creation of doc sets set \ref cfg_generate_docset "GENERATE_DOCSET"
Packit Service 50c9f2
   to \c YES in the config file. There are a couple of other doc set related
Packit Service 50c9f2
   options you may want to set. After doxygen has finished you will find
Packit Service 50c9f2
   a Makefile in the HTML output directory. Running "make install" on this
Packit Service 50c9f2
   Makefile will compile and install the doc set.
Packit Service 50c9f2
   See this 
Packit Service 50c9f2
   article for more info.
Packit Service 50c9f2
Packit Service 50c9f2
   Advantage of this method is that it nicely integrates with the Xcode
Packit Service 50c9f2
   development environment, allowing for instance to click on an identifier 
Packit Service 50c9f2
   in the editor and jump to the corresponding section in the doxygen 
Packit Service 50c9f2
   documentation.
Packit Service 50c9f2
Packit Service 50c9f2
   Disadvantage is that it only works in combination with Xcode on MacOSX.
Packit Service 50c9f2
Packit Service 50c9f2

6. Qt Compressed Help

Packit Service 50c9f2
   If you develop for or want to install the Qt application framework,
Packit Service 50c9f2
   you will get an application 
Packit Service 50c9f2
   called Qt assistant. 
Packit Service 50c9f2
   This is a help viewer for Qt Compressed Help files (.qch).
Packit Service 50c9f2
Packit Service 50c9f2
   To enable this feature set \ref cfg_generate_qhp "GENERATE_QHP" to \c YES.
Packit Service 50c9f2
   You also need to fill in the other Qt help related options, such as
Packit Service 50c9f2
   \ref cfg_qhp_namespace "QHP_NAMESPACE", 
Packit Service 50c9f2
   \ref cfg_qhg_location "QHG_LOCATION", 
Packit Service 50c9f2
   \ref cfg_qhp_virtual_folder "QHP_VIRTUAL_FOLDER".
Packit Service 50c9f2
   See this article 
Packit Service 50c9f2
   for more info.
Packit Service 50c9f2
Packit Service 50c9f2
   Feature wise the Qt compressed help feature is comparable with the CHM 
Packit Service 50c9f2
   output, with the additional advantage that compiling the QCH file is 
Packit Service 50c9f2
   not limited to Windows.
Packit Service 50c9f2
Packit Service 50c9f2
   Disadvantage is that it requires setting up a Qt 4.5 (or better) for
Packit Service 50c9f2
   each user, or distributing the Qt help assistant along with 
Packit Service 50c9f2
   the documentation, which is complicated by the fact that it is not
Packit Service 50c9f2
   available as a separate package at this moment.
Packit Service 50c9f2
Packit Service 50c9f2

7. Eclipse Help Plugin

Packit Service 50c9f2
   If you use eclipse, you can embed the documentation generated by
Packit Service 50c9f2
   doxygen as a help plugin. It will then appear as a topic in the help 
Packit Service 50c9f2
   browser that can be started from "Help contents" in the Help menu.
Packit Service 50c9f2
   Eclipse will generate a search index for the documentation when you
Packit Service 50c9f2
   first search for a keyword.
Packit Service 50c9f2
Packit Service 50c9f2
   To enable the help plugin set 
Packit Service 50c9f2
   \ref cfg_generate_eclipsehelp "GENERATE_ECLIPSEHELP" to \c YES,
Packit Service 50c9f2
   and define a unique identifier for your project via
Packit Service 50c9f2
   \ref cfg_eclipse_doc_id "ECLIPSE_DOC_ID", i.e.:
Packit Service 50c9f2
\verbatim
Packit Service 50c9f2
   GENERATE_ECLIPSEHELP = YES
Packit Service 50c9f2
   ECLIPSE_DOC_ID       = com.yourcompany.yourproject
Packit Service 50c9f2
\endverbatim
Packit Service 50c9f2
   then create the \c com.yourcompany.yourproject directory (so with
Packit Service 50c9f2
   the same name as the value of \c ECLIPSE_DOC_ID) in the 
Packit Service 50c9f2
   \c plugin directory of eclipse and after doxygen completes copy
Packit Service 50c9f2
   to contents of the help output directory to 
Packit Service 50c9f2
   the \c com.yourcompany.yourproject directory.
Packit Service 50c9f2
   Then restart eclipse to make let it find the new plugin.
Packit Service 50c9f2
Packit Service 50c9f2
   The eclipse help plugin provides similar functionality as the
Packit Service 50c9f2
   Qt compressed help or CHM output, but it does require that Eclipse is
Packit Service 50c9f2
   installed and running.
Packit Service 50c9f2
Packit Service 50c9f2
\htmlonly
Packit Service 50c9f2
Go to the next section or return to the
Packit Service 50c9f2
 index.
Packit Service 50c9f2
\endhtmlonly
Packit Service 50c9f2
Packit Service 50c9f2
*/