Package wt.index

See:
          Description

Interface Summary
Indexable The Indexable interface marks the classes whose objects can be indexed.
IndexPolicyManager The IndexPolicyManager presents an interface accessible also in the client to the functions provided in the server by the StandardIndexPolicyManager.
IndexServiceDelegate

Supported API: true

Extendable: false
 

Class Summary
Index This class defines an index as it is seen in the wt.properties file.
IndexPolicyHelper Helper class that provides convient access to the Index Policy Manager functionality through its manager member.
InstreamIndexDelegate

Supported API: true

Extendable: false
 

Exception Summary
IndexPolicyException Exception thrown when something goes wrong with the rule/list manipulation or index policy execution.
 

Package wt.index Description

Overview

The index policy manager (wt.index package) is responsible for the definition and execution of rules that automate index maintenance. To allow the index search of business objects, those objects are indexed in appropriate external search engine indices. A library/collection is a gathering of information that is indexed by a search engine and available for searching. At any time, a business object can belong to one or more libraries. Depending on the occurrence of events, such as whether the object has been released, the system may have to add or remove objects from the libraries. Even if the object stays with the library, it may have to be re-indexed to ensure that the most up to date information describing the object is indexed. Only the latest iteration of Iterated objects are indexed, so content of earlier iterations can not be queried.

Design Overview

The design of the index policy manager follows the same pattern as the other administrative policies. The Indexable interface marks those classes whose objects may be indexed in external libraries. Every Indexable object holds a list of the libraries (IndexerSet) in which it is currently indexed. Access to this list is possible through the static methods of the IndexerHelper class.

Indexing Model

For each type and state, it is possible to define the libraries the object should be in. This definition is called an index policy rule and is represented by the IndexPolicyRule class. Indexing policy rules are enforced by indexing policy lists (IndexPolicyLists class). The lists are derived from all of the rules that apply to a domain, type and state. The rules and lists contain a Selector object (domain/type/state) and a set of indexers. When an event occurs to an Indexable object, the indexer set in the policy list is the union of the libraries for all the applicable rules. Index policy lists are created on demand and for performance reasons, stored persistently in the database and in a server cache. The set of indexers in the policy list is used to update the object's indexer set. Besides providing methods for managing policies, the IndexPolicyManager also listens to events and triggers library updates. These are not performed immediately but queued for asynchronous execution.

Library Attributes

The default RwareIndexDelegate indexes every attribute, every instance-based attribute (IBA), the identity of every object reference connected with the business object (that is, the owner), the text of content files, and the links and descriptions of attached URLs. If a site wants to customize the set of fields that are available to a library, they must add the field to the RetrievalWare library itself, then update the wt.index.IndexFields property with the attribute name.

External Interface

The Index Policy Manager methods can be accessed through the IndexPolicyHelper class. Business Rules Although the indexing mechanism can use any event posted by any service, the implementation provided listens only to events that may cause the object index entry to become out of sync with the object. This list of events ensures maximum efficiency and ensures that index entries always remain up to date. There is no need to create a rule that removes the object from the libraries in the event that the object is deleted. The Index Policy Manager creates an implicit rule that does that.

Event Processing

For information about: