DataparkSearch Engine 4.53: Reference manual
Prev | Chapter 5. Storing data | Next

# 5.4. SearchD support

## 5.4.1. Why using searchd

- Faster searching, especially when using ISpell, synonyms or segmenters for east asian languages. Related files are loaded into memory when searchd is started, while `search.cgi` loads data before every query.

  Also, searchd can preload url info data (20 bytes per URL indexed) and cache mode limits (4 or 8 bytes per URL depend on limit type). This allow reduce average search time.

- It is possible to distribute words index and web-server between different machines.

## 5.4.2. Starting searchd

To start using searchd:

- Copy `$PREFIX/etc/searchd.conf-dist` to `searchd.conf`.

- Edit `searchd.conf`.

- If you need preload url data to speed-up searches (this cost about 20 bytes of memory per url), add the following command to `searchd.conf`:

      PreloadURLData yes

- You may also preload cache mode limits for most frequently used limit values using PreloadLimit command in `searchd.conf` file:

      PreloadLimit <limit type> <limit value>

  For example:

      PreloadLimit tag Unix

- Add the following command to `search.htm`:

  `DBAddr searchd://hostname/` or `DBAddr searchd://hostname:port/`, e.g.

      DBAddr searchd://localhost/

  Default `port` value is 7003

- You may start several searchd's children answering search queries simultaneously. Use MaxClients comamnd to specify the number of searchd's children. Value by default is 1.

      MaxClients 2

- Start searchd:

  `/usr/local/dpsearch/sbin/searchd &`

To suppress output to stderr, use `-l` option. The output will go through syslog only (in case syslog support was not disabled during installation with `--disable-syslog`). In case syslog is disabled, it is possible to direct stderr to a file:

`/usr/local/dpsearch/sbin/searchd 2>/var/log/searchd.log &`

`searchd` just like `indexer` can be used with an option of a configuration file, e.g. relative path to `/etc` directory of DataparkSearch installation:

    searchd searchd1.conf

or with absolute path:

`searchd /usr/local/dpsearch/etc/searchd1.conf`

Prev | Home | Next
DataparkSearch performance issues | Up | Oracle notes