Search Handler

OpenHierarhcy implements the concept of a search handler mediating the interaction between searchers and searchables. Searchers keep an index of the searchable content gathered from the searchables, and each searchable controls what information it makes available for search.

Typically, any module implementing the searchable interface register itself as a searchable during module initialization. The searchable module then exposes a method for retreiving a collection of its searchable content. Methods for updating and removing the searchable content are available on the search handler. This way, when information changes, the searchable module can update all searcher indexes through the handler.

Apache Lucene

OpenHierarchy comes with a search module implementing the searcher interface by use of the Apache Lucene library. The search module also performs authorization and filtering of search results by reading the access interfaces set on the searchable content and the traversed module and section descriptors.

A searchable implementation bundled with the framework is the page administration module which exposes web pages as searchable content (Lucene documents).

In order to facilitate the turning of modules into searchable modules, the OpenHierarchy API also provides a Lucene document factory which can be used to convert information into searchable content in the form of Lucene documents. A couple of OpenHierarchy specific fields are added to the Lucene documents in order to carry information such as the access interface of the underlying information and the searchable module descriptor.

Latest blog posts