company logo

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. I ndexes 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

Attributes
References
    Functions