What are Search Field Expressions?
A Search field expression for a Search Field, is the syntax/format/code/logic used to extract one or more unique values on selected Message Types. For example, an Order Number may exist in multiple messages (of different Message Types) and to find this Order Number, one or more search field expressions can be used for the Search Field.
Example of the Search Field Order Number that can be extracted from all the different messages part of an exchange
- There can be any number of search field expressions for a given Search Field
- Each search field expression can be used on one or more message type
- The search field expression can be set as being Global* (used on all message types) - Use with care!!! This option may affect overall system performance.
- The search field expression can be set as being Optional - Missing data will then not render the event in the Processed with Warnings* state
A Search Field Expression retrieves values from any part of the Log Event:
- Messages (message body/payload) (and/or depending on plugin)
- Context properties (Meta data stored in a Key/Value Collection for the Event
- Custom Plugins: External source using data from message or Context
The extract operation performed by the Logging Service uses the statement from the Expression on the selected Message Type using the selected Search Field Expression Type. The latter is a .NET dll implementing the appropriate contracts. The DLL's are put into the 'Plugins' folder of the Logging Service.
We at Nodinite have created many Search Field Expression Type plugins for many common scenarios. There are many different formats and data may be within the payload or within context properties (key/value pairs). You may also have the need to clean the data to get the result you seek (for example you only wants to extract the filename without suffix from a logged full path).
Different plugins comes with a different restrictions on what's possible, please review each one and/or the Troubleshooting user guide for further details.
Example of selection of Expression Types, in this case the high performance XPath plugin is being used
|Plugin Name||XML||EDIFACT/X12/FLATFILE||JSON||Context Property|
|Flat File CSV|
|Flat File Fixed Width|
|Message Context Key|
|RegEx on Message Context with capturing groups|
|RegEx on Message Context|
|RegEx with capturing groups|
|XPath on Message Context|
|XPath on Wrapped XPath|
|XPath with RegEx|
Nodinite is an extendable platform, you may write and add your own plugins. This is useful for special cases (lookup tables, API calls, ...) and encrypted messages.