AFSearchQueryToken Class
- Last UpdatedNov 18, 2025
- 4 minute read
- PI System
- AF SDK 2024 R2
- Developer
Represents a nested search query.
Inheritance Hierarchy
SystemObject
OSIsoft.AF.SearchAFSearchTokenBase
OSIsoft.AF.SearchAFSearchFilterToken
OSIsoft.AF.SearchAFSearchQueryToken
OSIsoft.AF.SearchAFSearchTokenBase
OSIsoft.AF.SearchAFSearchFilterToken
OSIsoft.AF.SearchAFSearchQueryToken
Namespace: OSIsoft.AF.Search
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
[SerializableAttribute] public class AFSearchQueryToken : AFSearchFilterToken
<SerializableAttribute> Public Class AFSearchQueryToken Inherits AFSearchFilterToken Dim instance As AFSearchQueryToken
[SerializableAttribute] public ref class AFSearchQueryToken : public AFSearchFilterToken
[<SerializableAttribute>] type AFSearchQueryToken = class inherit AFSearchFilterToken end
The AFSearchQueryToken type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| AFSearchQueryToken |
Creates a nested AFSearchQueryToken instance for the Filter.
Optionally, the initial TokenCollection may be set.
|
Properties
| Name | Description | |
|---|---|---|
| Filter |
The filter to be searched with the current token.
(Inherited from AFSearchTokenBase.) | |
| Operator | (Inherited from AFSearchFilterToken.) | |
| TokenCollection |
The collection of AFSearchTokenBase to be used for a nested query.
| |
| Value |
The value to compare the search filter on using the specified Operator.
(Inherited from AFSearchFilterToken.) | |
| Values |
The array of values to compare the search filter on using the specified Operator.
(Inherited from AFSearchFilterToken.) |
Methods
| Name | Description | |
|---|---|---|
| Equals(Object) |
Determines whether the specified Object is equal to the current object.
(Inherited from AFSearchFilterToken.) | |
| Equals(AFSearchFilterToken) |
Indicates whether the current object is equal to another object of the same type.
(Overrides AFSearchFilterTokenEquals(AFSearchFilterToken).) | |
| Equals(AFSearchQueryToken) |
Indicates whether the current object is equal to another object of the same type.
| |
| Equals(AFSearchTokenBase) |
Indicates whether the current object is equal to another object of the same type.
(Overrides AFSearchFilterTokenEquals(AFSearchTokenBase).) | |
| GetHashCode |
Gets the hash code for this instance of the object which is suitable for use in hashing
algorithms and data structures like a hash table.
(Overrides AFSearchFilterTokenGetHashCode.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| ToString |
Returns a String that represents the current object.
(Overrides AFSearchFilterTokenToString.) |
Remarks
This class represents a nested search query.
The AFSearchFilter and AFSearchOperator topics provide more information about the filters and operators that can be used in a search token.
Examples
// The following query string and code will generate the same token collections. IList<AFSearchTokenBase> tokensParsed = AFSearch.ParseQueryString("Parent:{ Name:Tank* OR Name:Valve* }"); IList<AFSearchTokenBase> tokens = new AFSearchTokenBase[] { new AFSearchQueryToken(AFSearchFilter.Parent, new AFSearchTokenBase[] { new AFSearchExpressionToken(AFSearchLogicalOperator.Or, new AFSearchTokenBase[] { new AFSearchFilterToken(AFSearchFilter.Name, "Tank*"), new AFSearchFilterToken(AFSearchFilter.Name, "Valve*") }) }) };
' The following query string and code will generate the same token collections. Dim tokensParsed As IList(Of AFSearchTokenBase) = AFSearch.ParseQueryString("Parent:{ Name:Tank* OR Name:Valve* }") Dim tokens As IList(Of AFSearchTokenBase) = New AFSearchTokenBase() { New AFSearchQueryToken(AFSearchFilter.Parent, New AFSearchTokenBase() { New AFSearchExpressionToken(AFSearchLogicalOperator.Or, New AFSearchTokenBase() { New AFSearchFilterToken(AFSearchFilter.Name, "Tank*"), New AFSearchFilterToken(AFSearchFilter.Name, "Valve*") }) }) }
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.