mnoGoSearch 3.2.33 reference manual: Full-featured search engine software
Prev |  | Next

# Chapter 5. Storing mnoGoSearch data

# SQL storage types

## Various modes of words storage

The different modes of word storage currently supported by mnoGoSearch are: "single", "multi" and "blob". Default mode is "single". The mode can be selected using the DBMode part of DBAddr command in both `indexer.conf` and `search.htm` files.

    Examples:
    DBAddr mysql://localhost/test/?DBMode=single
    DBAddr mysql://localhost/test/?DBMode=multi
    DBAddr mysql://localhost/test/?DBMode=blob

## Storage mode - single

When "single" is specified, all words are stored in a single table of structure (url_id,word,weight), where url_id is the ID of the document which is referenced by rec_id field in "url" table. Word has the variable char(32) SQL type. Each appearance of the same word in a document produces a separate record in the table.

## Storage mode - multi

If "multi" is selected, words are located in 256 separate tables using hash function for distribution. Structures of these tables are almost the same with "single" mode, but all word appearances are grouped into a single binary array, instead of producing multiple records. This fact makes "multi" mode much faster comparing with "single" mode.

## Storage mode - blob

If "blob" is selected, words are located in a single table of structure (word, secno, intag), where intag is a binary array of coordinates. All word appearances for the current section are grouped into a single binary array. This mode is highly optimized for search, indexing is not supported. You should index your data with "multi" mode and then run "indexer -Eblob" to convert "multi" tables into "blob". Note: this mode work only with MySQL for now, but will be extended to work with other databases in the future.

    Example:

    # indexer.conf
    DBAddr mysql://localhost/test/?DBMode=multi

    # search.htm
    DBAddr mysql://localhost/test/?DBMode=blob

## Substring search notes

"single", "multi" and "blob" modes support substring search. An SQL query containing a LIKE predicate is executed internally in order to do substring search.

Prev | Home | Next
Comments |  | Cache mode storage