|
The following base types are stored as strings: DATETIME, THINGNAME, USERNAME, GROUPNAME, HYPERLINK, IMAGELINK, MASHUPNAME, MENUNAME, DASHBOARDNAME, TEXT, GUID, NOTIFICATIONCONTENTNAME, NOTIFICATIONDEFINITIONNAME, STYLETHEMENAME, and THINGGROUPNAME.
|
|
Telemetry data should never be indexed.
|
Property Name
|
Property Type
|
Supports Indexed Queries?
|
---|---|---|
name
|
STRING
|
yes
|
description
|
STRING
|
yes
|
tags
|
TAGS
|
yes
|
isSystemObject
|
BOOLEAN
|
no
|
homeMashup
|
STRING
|
no
|
avatar
|
IMAGE
|
no
|
projectName
|
STRING
|
no
|
thingTemplate
|
STRING
|
yes
|
Operation Name
|
Notes
|
Potential Optimization States (if supplied on the request and not null)
|
||
---|---|---|---|---|
ResultDefinition
|
Specified through the basicPropertyNames and propertyNames parameters on the API call.
• basicPropertyNames — a list of basic properties to return.
• propertyNames— a list of built in and implementing entity properties to return.
|
• If all requested property definitions are indexed, QueryImplementingThingsOptimized runs an index query to generate the result set.
• If some requested property definitions are indexed and the operation is supported, QueryImplementingThingsOptimized will run an indexed query against the indexed properties and uses that result set to query the in-memory cache for the non-indexed properties.
• If none of the requested property definitions are indexed or a parameter is NULL, QueryImplementingThingsOptimized queries the in-memory cache.
|
||
NameMask
|
A mask-like pattern to match Thing names against.
|
NameMask has no impact on whether QueryImplementingThingsOptimized uses an index query.
|
||
NetworkName
|
A network name that a given implementing thing must belong to. Hints can be supplied. For example, you can supply network max depth and parent network names to help narrow down the search.
|
QueryImplementingThingsOptimized will query against the in-memory cache.
|
||
Tags
|
A list of tags the entity must be tagged with to be included in the result.
|
QueryImplementingThingsOptimized will use the index query for tags.
|
||
Offset
|
The offset to start query, used for pagination. For example, if there are 200 results in the database with an offset of 5, results 5 to 200 (for a total of 195) are returned.
|
Offset has no impact on whether QueryImplementingThingsOptimized uses an index query.
|
||
Sort
|
The sort to apply to the final result.
|
• If all properties defined in the sort are indexed, QueryImplementingThingsOptimized will run an index query to generate the result set.
• If some properties in the sort are not indexed, QueryImplementingThingsOptimized will query against the in-memory cache.
|
||
Query
|
The filter to apply to the result records.
|
• If all requested property definitions are indexed, QueryImplementingThingsOptimized will run an index query to generate the result set.
• If some requested property definitions are indexed, and the operation is supported, QueryImplementingThingsOptimized will run an indexed query against the indexed properties and use that result set to query the in-memory cache for the non-indexed properties.
• If none of the requested property definitions are indexed, QueryImplementingThingsOptimized will query the in-memory cache.
|
||
Limit
|
The maximum number of items to include in the result.
|
Limit has no impact on whether QueryImplementingThingsOptimized uses an index query.
|
Hint
|
Required?
|
Default
|
Action
|
---|---|---|---|
optimizationDisabled
|
no
|
Not included
|
• If a query is not specified, hint is not included in query or is false, QueryImplementingThingsOptimized will attempt to query as described above.
|
Entity Name
|
Entity Type
|
Implements
|
Property Name
|
Property Type
|
Property Indexed?
|
---|---|---|---|---|---|
TestThingTemplate1
|
ThingTemplate
|
GenericThing
|
p1
|
INTEGER
|
Yes
|
p2
|
STRING
|
Yes
|
|||
p3
|
INTEGER
|
No
|
|||
p4
|
STRING
|
No
|
|||
TestThing1
|
Thing
|
TestThingTemplate1
|
Inherited
|
Inherited
|
Inherited
|
TestThing2
|
Thing
|
TestThingTemplate1
|
Inherited
|
Inherited
|
Inherited
|
Scenario
|
Example
|
Index Query Used?
|
Comments
|
---|---|---|---|
All operations are supported, and the filter is fully supported.
|
{"sorts":[{"fieldName":"p1"}],"filters":{"type":"And","filters":[{"type":"EQ","fieldName":"p2","value":"12"},
{"type":"EQ","fieldName":"p1","value":"13"}]}} |
Yes
|
Only an indexed property is queried, so this will use an index query.
|
All operations are supported, and the filter is partially supported.
|
{"sorts":[{"fieldName":"p1"}],
"filters":{"type":"And","filters":[{"type":"EQ","fieldName":"p4","value":"12"},{"type":"EQ","fieldName":"p1","value":"13"}]}} |
Yes
|
ThingWorx will run an index query for property P1 and then a cache query on that result set for P4.
|
All operations are supported, and the filter is not supported.
|
{"sorts":[{"fieldName":"p1"}],"filters":
{"type":"Or","filters":[{"type":"EQ","fieldName":"p4","value":"12"},{"type":"EQ","fieldName":"p1","value":"13"}]}} |
No
|
ThingWorx performs a full cache query because of the OR filter, so an index query provides no benefit.
|
All operations are supported, no filter.
|
{"sorts":[{"fieldName":"p1"}]}
|
No
|
There is nothing to filter, so a query is not performed.
|
Some operations are supported, and the filter is fully supported.
|
{"sorts":[{"fieldName":"p4"}],"filters":{"type":"And","filters":
[{"type":"EQ","fieldName":"p2","value":"12"},{"type":"EQ","fieldName":"p1","value":"13"}]}} |
Yes
|
All filtered fields are indexed, so this query will use an index query.
|
Some operations are supported, and the filter is partially supported.
|
{"sorts":[{"fieldName":"p4"}],"filters":{"type":"And","filters":
[{"type":"EQ","fieldName":"p4","value":"12"},{"type":"EQ","fieldName":"p1","value":"13"}]}} |
Yes
|
This is the same as the example in row 2, with the exception that the SORT is on a non-indexed property.
|
Some operations are supported, the filter is not supported.
|
{"sorts":[{"fieldName":"p4"}],"filters":{"type":"Or","filters":[{"type":"EQ","fieldName":"p4","value":"12"},
{"type":"EQ","fieldName":"p1","value":"13"}]}} |
No
|
The filter is the same as the example in row 3, so this query does not support index queries.
|
Some operations are supported, a filter is not provided.
|
{"sorts":[{"fieldName":"p4"}]}
|
No
|
There is nothing to filter, so this is not supported.
|
Tags are queried, a filter is not provided.
|
Yes
|
Queries on tags are supported for index querying.
|