Plugin search lifecycle interface
The search lifecycle interface allows a plugin to execute code that performs query-time modifications to the question and response data model. This is equivalent to the modifications made by hook scripts in previous versions of Funnelback.
To interact with the search life cycle, you will need to implement the
SearchLifeCyclePlugin provides four different methods:
void preProcess(SearchTransaction transaction)
void preDatafetch(SearchTransaction transaction)
void postDatafetch(SearchTransaction transaction)
void postProcess(SearchTransaction transaction)
Each of these should manipulate the
SearchTransaction object which contains both the query under
question and results under
response. These methods run at the same time that their corresponding groovy hook scripts ran in the life cycle.
Once the plugin is enabled, searches will immediately begin using the plugin methods.
When writing unit tests for the
SearchTransaction use the following helper classes to generate the mock data sent to your tests:
Log messages will appear in the collection’s user interface logs.