Knowledge graph post update hook script
Introduction
The KnowledgeGraphPostUpdateScript.groovy
hook script allows you to perform a set of actions after the knowledge graph update is completed.
Location
KnowledgeGraphPostUpdateScript.groovy
can be set globally, in collection level or in profile level.
- If
KnowledgeGraphPostUpdateScript.groovy
is specified in the$SEARCH_HOME/conf
folder, it will affect all the collections. - If it is specified in the
$SEARCH_HOME/conf/$COLLECTION_NAME
folder, it will affect only that particular collection and its profiles. - If it is specified in the
$SEARCH_HOME/conf/$COLLECTION_NAME/$PROFILE_NAME
folder, it will affect only that particular profile.
Examples
import com.funnelback.common.profile.ProfileAndView
class postUpdateScript implements com.funnelback.cortex.integration.hookScriptRunner.postUpdate.PostUpdateTrigger{
@Override
boolean activate(String collectionId, ProfileAndView profileAndView) {
// your logic goes here
return true // return success or failure
}
}