See: Description
Interface | Description |
---|---|
IDfCompletionFilter |
A filter implements this interface to be notify of the query completion.
|
IDfContext |
Context for filters.
|
IDfFacetFilter |
A filter can implement this interface to transform facets.
|
IDfFilterOrderDependency |
Implementing this interface allow a filter to provide execution order information.
|
IDfGenerationContext |
Provide context about the generation of the query.
|
IDfQueryFilter |
A filter that can transform a query
|
IDfResultFilter |
A filter that can transform search results.
|
Enum | Description |
---|---|
DfFilterException.FilterExceptionType |
Type of error
|
IDfFilterOrderDependency.Dependency | |
IDfGenerationContext.Language |
Exception | Description |
---|---|
DfFilterException |
An exception raised by a filter.
|
This package contains interfaces to provide search services filters. A search filter is a plugin that transforms the
query and its results.
The advantage of using a filter is that one can modify the queries without changing existing applications.
Examples of uses are:
A filter should implement one or several of the following interfaces: IDfQueryFilter
,
IDfResultFilter
, IDfFacetFilter
or IDfCompletionFilter
.
The filter can access the execution context through the IDfContext
interface. It contains session manager, source description and other execution parameters.
The filter can interact with the search service in several ways:
IDfQueryStatus
object.A filter can be deployed in two ways:
A filter is instantiated each time a query is executed.
If the same filter implements several filters interfaces, it is instantiated only once per query.
When multiple sources are queried, it is instantiated once for
each search source. The only exception is for external sources where the filter is instantiated and called for all
the sources.
A filter class is loaded lazily, when the first query is executed. As a consequence, if an error occur during filter
loading it will only be notified at that time. Error due to filter prevent normal query execution. The exception will
appear in the query status of IDfQueryProcessor
.
A filter is called in the DFC Search Service execution pipeline. It is called before the the system generates the query in the source language.
As a consequence, it can modify the input query and results, but it has limited control over the query generation itself.
One cannot manipulate the DQL satement for example.
The filter interfaces methods are called in the following order:
For Docbase, only one thread calls the filter instance. For external sources, the filter instance can be called concurrently by different threads.
If an exception occur during the execution of a filter, the query execution is aborted. Such an exception are reported in
the IDfQueryStatus
object as intrenal failure. The filter can also throw a com.documentum.fc.client.search.DfFilterException
to
report user input error. In this case, it is transform to the appropriate error status (syntax error, login failed...).
Copyright 1994-2023 OpenText Corporation. All rights reserved.