Feed Triggers
A Feed Trigger is an entry point to alter the behavior of a Feed.
It is called by the Mashup API before and after the feed execution, allowing for query manipulation, context modification and results manipulation.
Therefore, Feed Triggers can do the following:
-
Decide to override the query to be issued to the actual ‘execute’ method based on query expansion (
beforeQuery
method) -
Decide to replay the feed execution because the result obtained is not satisfying, for example, if there are no results (
afterQuery
method that returnsResult.EVAL_AGAIN
)
Example:
You can use a Feed Trigger on any Feed in your configuration to customize query processing or feeds behavior for different purposes such as:
-
Query rewriting
-
Query computing from previously retrieved results
-
Enabling / Disabling feeds