IndexManager - Index Manager
The class supports object indexing services (OSI), which provides an index feature in ODABA. One may associate a predefined set of key words with any number of objects containing one or more text fields. Indexes are language dependent.
The idea of indexing is based on keywords (list with relevant words), which correspond to words appearing in the text. Since words might be written in different ways (example, examples), each keyword can be associated with a lexical base. Keywords providing a lexical base will link the objects to be indexed to the lexical base, i.e. searching for "example" or "examples" leads to the same result. Keywords not having a lexical base will directly link to the indexed objects.
Since text may contain irrelevant words, those might be put to a stop word list. Stop words are not used for indexing. Keyword and stop-word definitions should inherit from DSC_Term.
The class supports building auto keyword lists, but also to associate objects with predefined keyword lists (e.g. concept definitions).
Since index services are based on ODABA terminology model definitions, you need to derive objects to be indexed from DSC_Object.
The IndexManager() class supports functionality for creating keyword indexes and for searching objects in keyword indexes. Options for indexing can be provided in a configuration or ini-file or must be set by the application (SetOption()).
IndexManager im;
// Create keyword index
im.OpenKWCollections(dbhandle,"IndexManager"); // name of section in ini-file
im.Run(dbhandle,"IndexBooks"); // section name for indexing books
im.Run(dbhandle,"IndexVideos"); // section name for indexing videos
// search by keywords
count = im.Search(dbhandle,"table,crime,london",
&result_ph,NULL,50); // returns 50 object instances of any type in result_ph
- collection - Collection
- field_names - Field name list
- object - Currently selected object
- AddKeyword - Add keyword
- AddStopword - Add stopword
- AssociateObject - Associate object
- Close - - internal feature (not documented)
- CloseFields - - internal feature (not documented)
- CloseKWCollections - Close keyword collections
- CloseObject - Close object collection
- CreateKWEntries - Create keyword entries
- CurrentTextPH - Returns the property handle for the current text field
- EnableAutoKey - Enable/disable 'auto-keyword' option
- EnableExpandKey - Enable/disable 'expand keyword' option
- EnableKeywords - Enable/disable 'keyword' option
- EnableRemoveKeywords - Enable/disable 'remove keywords' option
- EnableStopwords - Enable/disable 'stop word' option
- EnableTypeList - Enable/disable 'type list' option
- FindKeyword - Locate keyword
- GetKWCount - - internal feature (not documented)
- GetKeyword - Get keyword
- GetObjectPH - - internal feature (not documented)
- GetPosition - Get text position
- GetWord - Get currently selected word
- IndexManager - Create IndexManager
- InitRating - - internal feature (not documented)
- IsNewText - Has text changed
- IsStopword - Checks stopwords
- LocateKeywords - Locate keywords in a keyword search string
- MatchByType - Match objects by type
- Next - Get next undefined word
- NextField - Provide next field
- NextInstance - Provide next instance
- NextWord - Provide next word
- NormalizeSearchString - Normalize keyword search string
- Open - Open index manager resources
- OpenCurrentText - - internal feature (not documented)
- OpenFields - Open field list
- OpenInstance - Set instance to be indexed
- OpenKWCollections - Open keyword collections
- OpenObject - Open object collection
- PrintOptions - Print indexing options
- PrintResult - Print result
- RemoveKWEntries - Remove keyword entries
- ResetField - Reset field position
- ResetLexTerm - Reset lexical base for selected keyword
- Run - Run index manager
- Search - Search objects by keyword
- SearchByType - Search objects by type
- SearchText - - internal feature (not documented)
- SetCollection - Set collection
- SetLanguage - Set language
- SetupFieldList - Setup field list
- SetupKWCollectionPaths - Setup keyword collection paths
- SetupOptions - Setup IndexManager options
- ShowOptions - Show index options
- ~IndexManager - Destructor