Search PI points by name and description using queries
Feature request
Abstract
Add functionality for searching PI points by name or description attributes (with wildcards).
Motivation and summary
I can't figure out how to use generic queries that would enable the user to retrieve all PI points matching a name or description (e.g. finding all tags with London in the name).
Suggested solution
I would like to write queries using the syntax given here: https://docs.aveva.com/bundle/af-sdk/page/html/pipoint-query-syntax-overview.htm. For instance:
query = "Name:=Tank*"
server.search(query)
to return all PI points with name beginning with "Tank". Same for description.
Rejected options
I understand it's possible to pull all PI points and then filter within Python as described in #502. However, I am dealing with >100k PI tags, so this would be very slow.
Additional context
If this is already supported, then please could you provide an example?
Thanks very much for your work on this excellent package!
I think this should be relatively easy to implement. It is possible to use some wildcards in the query, searching for "P*t" would return all points with a name starting with P and ending in t, but the full query syntax requires a different overload of the FindPIPoints method in the AF SDK. I'll have to try if I can easily call the other variant without breaking all existing code, and if not what the best way forward is to allow these more complex queries.
That would be really helpful. For the time being I have pulled all of our PI points and am keeping a local database of their description fields. But it would be great to build tooling allowing us to search for PI points by description.