In this context, two methods play a major role: an init()
method to handle general parameters, and an inform()
method that will handle a different type of object, depending on the Aware
interface implemented.
A typical lifecycle of these components will be defined in a few steps. It is shown in the following diagram:
Let's read the sequence given in the preceding diagram in order:
init()
method is called to inject values via its arguments. The parameters accepted here will be of one of the following types such as Map
, NamedList
, and PluginInfo
. The NamedList
parameter is a collection designed to be similar to the Map
parameter, but it contains repeatable keys.ResourceLoaderAware
call inform(ResourceLoader)
to obtain the information needed.SolrCoreAware
plugins call inform(SolrCore)
to obtain the core-specific configurations.You will find more references at the wiki page: http://wiki.apache.org/solr/SolrPlugins. However, starting from this simple schema, it's not too much complex to have an idea on how to proceed for our code. So let's look at some example.
18.227.26.217