You can customize iKnow to allow users to add their own custom metrics for entities, CRCs, CCs, paths, sentences and/or sources. These metrics can be populated for all sources in the domain, or for select sources. You can then query by these custom metric values.
Custom Metrics software is a Technology Preview, a new category of software at 2013.1. A Technology Preview is intended as a way of introducing and providing access to new software capabilities that InterSystems believes will be useful in enhancing the effectiveness of existing and future applications.
The capabilities listed here are ready for use by customers, but they are not yet complete in functionality and design. Customers who take advantage of these capabilities must understand:
InterSystems makes no backward compatibility guarantee with future updates;
Customers may incorporate these capabilities in deployed applications, but must first check with InterSystems to determine best course of action;
Customers who deploy these capabilities in their applications must commit to upgrading to the final released version.
InterSystems strongly encourages those who incorporate these items in their software to provide feedback on their experiences.
Implementation of custom metrics involves the following steps:
Register the metric definition: To associate a metric definition with a particular domain, call the Register()
method of the %iKnow.Metrics.MetricDefinition class to register your %iKnow.Metrics.MetricBuilder
subclass as the "builder class" in the definition. This registers all metrics, their properties and targets, as defined in the Metrics XData block. Registering the metric definition configures any data structures required to store the metric values.
Unless your %iKnow.Metrics.MetricBuilder
subclass overrides the SUPPORTSMULTIPROCESS parameter (default = 1), the Build()
method will divide the work over multiple processes, each instantiating separate MetricBuilder
objects and processing batch after batch of entries using those builder objects. For source-indexed target types, these are batches of sources, for which all the target elements are processed by the same builder process.
methods don't return any values for a particular target element, the existing metric value is retained (if any). Returning "" for a value will overwrite (erase) the existing value.
A metric has a type which specifies whether the metric values apply within the context of the whole domain, or just one particular source or metadata group. The available values are $$$IKMTRTYPEDOMAIN, $$$IKMTRTYPESOURCE, and $$$IKMTRTYPEGROUP.
$$$IKMTRTYPEGROUP metrics are valid in the context of a group of sources, as defined by a particular metadata field. Metric Builder classes for this type of metric can use the CurrentFieldName and CurrentFieldValue property values as part of their Calculate***Metrics() implementation.
A metric has one or more targets, which are the elements the custom metric applies to. The available values are $$$IKMTRENTITY, $$$IKMTRCRC, $$$IKMTRCC, $$$IKMTRPATH, $$$IKMTRSENTENCE, and $$$IKMTRSOURCE. The target is specified by which Calculate***Metrics()
method you specify. For example, CalculateEntUniMetrics()
applies to target $$$IKMTRENTITY; how it is applied depends upon the type.
You can copy metrics from one domain to another within the current namespace.
© 1997-2019 InterSystems Corporation, Cambridge, MA