Index

DKTextIndexDefICM

Purpose:

Content Manager Version 8 allows an administrator to make attributes text-searchable. In addition, the text content in the Resource Manager can also be made text searchable. For such searches to work in an optimal manner, a text search index must be defined. The DKTextIndexICM class holds all the properties of a text search index in Content Manager. It contains set and get methods to set and query this information. It has no interaction with the server itself. An instance of this class may be specified when defining an attribute for a component. If this class is specified, it makes the attribute text searchable. Conversely, setting the value of the instance of this class associated with the attribute to null makes the attribute non text-searchable. An instance of this class can also be used to specify the text index properties for a text resource item type.

Constant to specify text format for indexed documents. TEXT_INDEX_DOC_FORMAT_TEXT = "TEXT"

Constant to specify html format for indexed documents. TEXT_INDEX_DOC_FORMAT_HTML = "HTML"

Constant to specify xml format for indexed documents. TEXT_INDEX_DOC_FORMAT_XML = "XML"

Constant to specify gpp format for indexed documents: TEXT_INDEX_DOC_FORMAT_GPP = "GPP"

Class summary:

class DKEXPORT DKTextIndexDefICM
{
 public:                
                        DKTextIndexDefICM();
                        ~DKTextIndexDefICM();
                        DKTextIndexDefICM(DKTextIndexDefICM& attr1);
        long            getIndexCCSID();
        void            setIndexCCSID(long indexCCSID);
        DKString        getIndexLangCode();
        void            setIndexLangCode(const char* indexLangCode);
        long            getMinChanges();
        void            setMinChanges(long minChanges);
        DKString        getUpdateFrequency();
        void            setUpdateFrequency(const char* updateFreq);
        long            getCommitCount();
        void            setCommitCount(long commitCount);
        DKString        getFormat();
        void            setFormat(const char* format);
        DKString        getIndexDir();
        void            setIndexDir(const char* indexDir);
        DKString        getWorkingDir();
        void            setWorkingDir(const char* workingDir);
        DKString        getModelName();
        void            setModelName(const char* modelName);
        DKString        getModelFile();
        void            setModelFile(const char* modelFile);
        long            getModelCCSID();
        void            setModelCCSID(long modelCCSID);
        DKString        getUDFName();
        void            setUDFName(const char* udfName);
        DKString        getUDFSchema();
        void            setUDFSchema(const char* udfSchema);
 
 };

Members:

Constructors and destructor
DKTextIndexDefICM()

Default constructor for the component type index class. Constructs the definition of the index class for a component type definition. Copy Constructors

DKTextIndexDefICM(const DKTextIndexDefICM& compIndex)

A copy constructor for component type index definition object. The new instance of the component type index definition will contain all the information copied from the original one.

Parameters: compIndex - a component type index definition object, DKTextIndexDefICM. Destructor

virtual ~DKTextIndexDefICM()

Destructor for this object.

Member functions

getIndexCCSID
Gets CCSID used for building a text index. The default for this is the CCSID of the database that the text index is created in.

Returns: the CCSID used for building the text index

long getIndexCCSID();

setIndexCCSID
Sets the CCSID used for building this text index. The default for this is the CCSID of the database that the text index was created in.

Parameters: indexCCSID - the CCSID that will be used for building this text index

void setIndexCCSID(long indexCCSID);

getIndexLangCode
Retrieves the language code for theis text index. This language code is not in the same format as the language code that CM uses. The index language code is in the form "EN_US" (US English) whereas the same language code in CM would be "ENU".

Returns: the language code for the text index

DKString getIndexLangCode();

setIndexLangCode
Sets the language code for the text index. This language code is not in the same format as the language code that CM uses. The index language code is in the form "EN_US" (representing US English) whereas the corresponding representation for US English in CM would be "ENU".

Parameters: languageCode - value to set the language code of the text index to

void setIndexLangCode(const char* indexLangCode);

getMinChanges
Retrieves the minimum number of changes to the text column that may occur before this text index is updated automatically. The default is to never update the text index. This implies that the index must be updated manually.

Returns: the minimum number of changes before this text index is updated automatically

long getMinChanges();

setMinChanges
Sets the minimum number of changes to the text column that may occur before the text index is updated automaticially. The default is to never update this index. This implies that the index must be updated manually.

Parameters: minChanges - the value to set for the minimum number of changes to occur to the text column before an automatic update of this text index.

void setMinChanges(long minChanges);

getUpdateFrequency
Retrieves the update frequency for this text index. This value indicate when the automatic update is to be made. For details on the update frequency syntax, see the TIE documentation. The default is to never update this text index. This implies that the index must be updated manually.

Returns: the update frequency for this text index.

DKString getUpdateFrequency();

setUpdateFrequency
Sets the value for the update frequency for this text index. This value indicates when the automatic update is to be made. For details on the update frequency syntax, see the TIE documentation. The default is to never update this text index. This implies that this index must be updated manually.

Parameters: updateFreq - value to set the update frequency for this text index to

void setUpdateFrequency(const char* updateFreq);

getCommitCount
Retrieves the commit count for this text index. This value is the number of updated rows that will be processed before a commit is executed during the process of index updating. This value is useful when processing large numbers of documents.

Returns: commit count for this text index

long getCommitCount();

setCommitCount
Sets the commit count for this text index. This value is the number of updated rows that will be processed before a commit is executed during the process of index updating. This value is useful when processing large numbers of documents.

Returns: commitCount - new value for the number of rows to process before a commit is executed

void setCommitCount(long commitCount);

getFormat
Retrieves the format of text documents in the index. The default format is "TEXT".Other possible values are "HTML", "XML" and "GPP".

Returns: format of the text documents associated with this text index

DKString getFormat();

setFormat
Sets the format of text documents in the index. Possible values are: "TEXT", "HTML", "XML", and "GPP".

Parameters: format - new value for the format of text documents associated with this text index

void setFormat(const char* format);

getIndexDir
Retrieves the name/value for the directory on the server where the text index is to be stored.

Returns: the name of directory on the server where the index data is stored

DKString getIndexDir();

setIndexDir
Sets the value for the directory on the server where the text index is to be stored. This value must be a directory on the server.

Parameters: value/name for a directory on the server where the index data is to be stored

void setIndexDir(const char* indexDir);

getWorkingDir
Retrieves the working directory for this text index. This is a directory on the server used to store temporary files created during indexing.

Returns: the value for the working directory used to store temporary files needed during indexing

DKString getWorkingDir();

setWorkingDir
Sets the value of the working directory for this text index. This is a directory on the server used to store temporary files created during indexing.

Parameters: workingDir - value for the working directory where temporary files created during the indexing process of this text index will be stored

void setWorkingDir(const char* workingDir);

getModelName
Retrieves the model name for this text index. A model is used to define the characteristics of the text that will be indexed. For details on Models pleas refer to the TIE documentation. The default behavior is to not have a model.

Returns: model name or empty string (if no model is associated with this text index)

DKString getModelName();

setModelName
Sets the name of the model associated with this text index. A model may be used to define the characteristics of the text that will be indexed by this text index. For details on Models see the TIE documentation. The default behavior is to not have a model.

Parameters: modelName - name of the model to be associated with this text index

void setModelName(const char* modelName);

getModelFile
Retrieves the model file for the model associated with this text index. A model may be used to define the characteristics of the text that will be indexed. For details on Models see the TIE documentation. The default behavioris to not have a model associated with this text index.

Returns: model file for the model associated with this text index or empty string (if there is no model for this text index)

DKString getModelFile();

setModelFile
Sets the value for the model file associated with this text index. A model may be used to define the characteristics of the text that will be indexed. For details on Models see the TIE documentation. The default behavior is to not have a model.

Parameters: modelFile - value for the model file for the model associated with this text index

void setModelFile(const char* modelFile);

getModelCCSID
Retrieves the model CCSID of the model file associated with this text index. The default value for this is the CCSID of the database.

Returns: the CCSID used for building the text index

long getModelCCSID();

setModelCCSID
Sets the model CCSID of the model file associated with this text index. The default value for this is the CCSID of the database.

Parameters: modelCCSID - value for the CCSID used for the model file

void setModelCCSID(long modelCCSID);

getUDFName
Gets the name of a user defined Function (UDF) that will be used to fetch or filter the content that are indexed. If a UDF is specified, the UDF will be called with the value in the column being indexed during indexing. The UDF must return the textual content that is to be indexed. This UDF may be used for filtering or for fetching content from another location such as a URL. For text resource items, a system defined UDF is used to fetch content from the resource manager. If you specify your own UDF for a text resource item type, your UDF is responsible for fetching the content associated with that item type. The default behavior is to have no UDF defined, except when used for text resource item types.

Returns: the name of the UDF (if, any) or an empty string.

DKString getUDFName();

setUDFName
Sets the name of a user defined Function (UDF) that will be used to fetch or filter the content that is indexed. If a UDF is specified, the UDF will be called with the value in the column being indexed during indexing. The UDF must return the textual content that is to be indexed. This UDF may be used for filtering or for fetching content from another location such as a URL. For text resource items a system defined UDF is used to fetch content from the resource manager. If you specify your own UDF for a text resource item type, your UDF is responsible for fetching the content associated with this item type. The default behavior is to have no UDF, except when used infor text resource item types.

Parameters: udfName - value for the UDF name that will be used to generate indexable content associated with this text index

void setUDFName(const char* udfName);

getUDFSchema
Retrieves the schema of the user defined function(UDF) associated with tis text index. The default is no UDF and thus no UDF schema.

Returns: udfSchema - value for the UDF schema or empty string (if no defined UDF schema).

DKString getUDFSchema();

setUDFSchema
Sets the schema of the user defined Function(UDF). By default, there is no UDF and thus no UDF schema for text indexes.

Parameters: udfSchema - value for the UDF Schema associated with this text index

void setUDFSchema(const char* udfSchema);

(c) Copyright International Business Machines Corporation 1996, 2003. IBM Corp. All rights reserved.