Case insensitive search in filter panel
Description
is duplicated by
Lucidchart Diagrams
Activity
Scott Theleman July 19, 2022 at 8:19 PM
Investigated this issue.
Main issue is that we are using FIQL ("Feed Item Query Language") to send a search query from our HELM code to the backend OpenNMS Entity Rest API.
However FIQL doesn't support ILIKE. It only supports '==' for EQ or LIKE, plus wildcards.
In HELM for example in an Alarm Table Panel, when making an AlarmEntity call with nodeLabel in a Filter Panel textbox,
we do wrap the 'node.label' param in "*" and use API.Comparators.EQ, which causes the server side Java to use LIKE Criteria but not ILIKE. Ultimately this is passed onto Postgres as a case sensitive 'like' instead of an 'ilike'.
To enable case insensitive search functionality, at a high level, we would need to do something like the following.
Update 'opennms' server side 'opennms-webapp-rest' to add a new CaseInsensitiveCriteriaBehavior plus some other plumbing in Rest services to denote when a case insensitive search is desired. Would have to have some way of denoting on a case-by-case basis whether an entire query or just a particular parameter should be searched case insensitively. This gets a bit deep into the whole criteria plumbing code and we would have to work around the Apache/JAX-RS FIQLParser whch doesn't support ILIKE. We also don't want to just turn on ILIKE globally as this would impact all OpenNMS Entity Rest API calls used anywhere.
Update 'opennms-js' project client Dao classes and similar to either use/enable a new/altered FIQL comparator, or else be able to pass a flag or some other wildcard indicator to denote that case insensitive search is desired for a particular property
In 'opennms-helm', need to update to call 'opennms-js' correctly to enable the ilike search. Also, do we always do this for all FilterPanel textboxes, or need additional configuration?
I have much more extensive technical notes which go into the details, it gets a bit involved and messy.
We should meet to discuss and prioritize.
Details
Assignee
Scott ThelemanScott ThelemanReporter
Jesse WhiteJesse WhiteLabels
HB Grooming Date
Nov 24, 2020HB Backlog Status
BacklogStory Points
5Components
Sprint
NonePriority
Minor
Details
Details
Assignee
Reporter
Labels
HB Grooming Date
HB Backlog Status
Story Points
Components
Sprint
Priority
PagerDuty
PagerDuty Incident
PagerDuty
PagerDuty Incident
PagerDuty

When using the filter panel, it should be possible to configure a field to perform case insensitive search.
For example, when using the node label field, I would expect to be able to type in "asa", but still match nodes called "ASA123".