Creating document stores

A document store is a collection of documents in Sybase Search related by physical location. You can organize documents into the following types of document stores:

File system document stores

A file system document store represents one or more collections of documents imported into Sybase Search from a local file system, including mapped network drives. The file system document store accepts one or more directory roots (for example, D:\documents\office), the contents of which Sybase Search indexes.

Although documents from different file systems (C:\docs\ and \\network-share\docs) can coexist in the same document store, internally, all documents found in all root directories of a file system document store are indexed together. This means they share the same data structures, and they are updated and removed together. Sybase Search analyzes folders and subdirectories. Files with valid MIME types are then indexed. You can customize the list of valid MIME types.

Database document stores

A database document store represents a collection of documents imported into Sybase Search from one or more database tables. You use a SQL query to import documents from database tables into Sybase Search. (See “Constructing an import query SQL statement”.)

All data conversions are handled internally, including files stored in binary format and links to files elsewhere on a system. Sybase Search can import data from any database for which JDBC drivers can be obtained.

StepsTo create a document store

  1. Click Document Management. The Document Store Managers page appears.

  2. From the Document Store Managers page, click Document Stores.

  3. From the Document Stores page, determine the type of document store that you want to create.

    The Create Document Store page appears. The type of document store you selected is displayed in the Type field.

  4. Complete the following fields:

    Field

    Description

    Fields common to file system and database document stores

    Name

    Indicates the name of the document store.

    Manager

    Indicates the document store manager for which the document store should exist. A document store manager manages zero or more document stores. Typically, there is one document store manager for each server where document indexing occurs. The document store manager for each document store that you create lets you set up document indexing on the different servers in the system. See “Managing document stores”.

    Member of

    Indicates the document groups in which the document store is a member. See “Grouping document stores”.

    Not a Member of

    Indicates the document groups of which the document store is not a member.

    Index Now

    Indicates whether to proceed with indexing immediately or to save the configuration without indexing at this time. See “Indexing document stores”.

    Fields for file system document stores

    Directories

    Indicates one or more root directory whose contents will be indexed and available for searching.

    File Type Filter

    Includes or excludes documents by file extension or MIME type, for example:

    • Include text/html – indexes only HTML documents.

    • Include doc – indexes only Microsoft Word documents.

    • Exclude text/xml, txt – indexes all documents except XML and text documents.

    Fields for database document stores

    Host

    Indicates the network name or IP address of the database server.

    DB Name

    Indicates the name of the database.

    Username

    Indicates the name of the user and authenticates access to the database.

    Password

    Indicates the password used to authenticate access to the database.

    Presets

    Indicates the type of database and the configuration of the Java Database Connectivity (JDBC) options. When you select a database from the Presets list, Sybase Search automatically displays the port, driver, and URL with common values for the type of database selected. The Presets list is configurable.

    To use a preset:

    1. Complete the Name, Manager, and Member of fields for the database document store.

    2. Complete the Host, DB Name, Username, Password, and Port fields for the JDBC connection details.

    3. Select the a preset from the Presets list. The port, driver, and URL fields display the corresponding default values.

    4. Click the Translate URL placeholders link to replace the URL template placeholders with the correct values.

    NoteInclusion of a database driver in the Presets list does not mean the driver is available to the system. Ensure that the driver is available to the selected document store manager.

    Port

    Indicates the port on which the database server listens.

    Driver

    Indicates the full class name of the JDBC driver.

    URL

    Indicates the JDBC URL to use to contact the database.

    SQL Query

    Indicates the SQL statement designed to import documents from a database. (See “Constructing an import query SQL statement”.)

    Class

    Identifies the document reference class, signifies the java class type that should be used by Sybase Search internally to store the DOC_REF SQL datatype. The document reference class is automatically determined the first time data is extracted from the database and it cannot be changed.

    Length

    Identifies the document reference length. The document reference length is only used for java.lang.String document reference types (the lengths of other types are implicit). In most cases, it should be the same as the VARCHAR column width from which the document references are being extracted. If the document reference is not a string, this value is ignored.

  5. Click Create.

    The document store is created. You return to the Document Store Information page of the document store that you created. The details of the document store display its number of searchable documents and a list of the indexed document roots. An indexing summary is also listed and, if the store is being indexed, the current indexing session information is displayed. See “Indexing document stores” for more information about Sybase Search indexing concepts.

  6. Click Edit to edit the attributes of the document store.

    You can edit most of the document store attributes. For example, you can rename a document store; add or remove document roots; add or remove File Type Filters; and move the document store in and out of document groups.

  7. Click Remove to remove a document store.

    When you remove a document store, all settings and indexes are permanently removed from the disk. All documents indexed under the removed document store are no longer returned in searches.