Blame doc/searching.doc

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

1. Client side searching

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

2. Server side searching

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

3. Server side searching with external indexing

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

4. Windows Compiled HTML Help

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

5. Mac OS X Doc Sets

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

6. Qt Compressed Help

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

7. Eclipse Help Plugin

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