Visual Query condition rules
Visual Query condition rules enable you to prevent users from running queries with particular characteristics, or to allow only specific queries. To manage the performance of Visual Query effectively, it is important to understand the types of rules that are available.
The sample visual-query-configuration.xml file in the toolkit\configuration\live directory includes commented-out examples of rules that can apply to the law enforcement schema. Using these examples as guidance, you can create rules that apply to your system.
Important:
Any rules that you add to visual-query-configuration.xml (and subsequently deploy) affect the i2 Analyze server but not the Analyst's Notebook desktop client. As such, users are still able to construct queries that include restricted conditions, but the server will prevent such queries from being run.
If you create rules that restrict specific characteristics after analysts have started to use the system, any saved queries that use those characteristics become invalid. If analysts have configured alerts for those queries, they will no longer receive them. Always check with your analysts before you restrict characteristics from Visual Queries.
Depending on your circumstances, there are two main approaches that can be used to create your rules:
Invalidating a particular type of query
If you know that your data can cause problems for particular queries - for example, a query that involves a particular item type or a particular operator - then you can prevent such queries from taking place. All other Visual Query behavior can then remain unchanged.
Enabling specific queries
If you are uncertain about which kinds of query might encounter problems, or you want to restrict the types of searches that users can carry out, you can start by preventing all queries, and then selectively allow the types of query that you require.
As you build up your Visual Query configuration file, bear in mind the following key concepts:
Rule components
Each rule consists of the following components:
Rule type - Whether the rule should allow or deny a specific type of query
Item type - Which item type the rule should apply to
Property type - Which property types of the specified item type the rule should apply to
Operator - Which operators the rule should apply to
Date and time aspects - Which types of temporal aspect the rule should apply to. For example, day of the week, or time of the day.
Implicit 'all'
If a rule does not specify one or more of the above components, then it applies to the component as a whole. For example, a rule that specifies an item type but not a property type applies to all property types of that item type.
Rule ordering
Visual Query rules are applied sequentially, which means that rules that come later in the file can override earlier. This allows you to refine your conditions. For example:
<Deny/> <!-- Allow 'Person' searches to include conditions for 'Date of birth' and 'Gender' that are exactly or between a specified range --> <Allow ItemTypeId="ET5" PropertyTypeIds="PER9, PER15" Operators="EQUAL_TO, BETWEEN"/>
Using these rules, searches for people with specified dates of birth or genders are permitted, but all other Visual Query conditions are prevented from running.