Search for nodes/edges
Required capabilities:
DataModels:READ
Search text fields in views for nodes or edge(s). The service will return up to 1000 results. This operation orders the results by relevance, across the specified spaces.
Documentation Index
Fetch the complete documentation index at: https://docs.cognite.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.
Body
The search specification.
Searching nodes or edges using properties from a view
Reference to a view
Query string that will be parsed and used for search.
Limit the search query to searching nodes or edges. Unless you set the item type to apply the search to, the service will default to searching nodes within the view.
node, edge Optional array of properties you want to search through. If you do not specify one or more properties, the service will search all text fields within the view.
Properties to convert to another unit. The API can only convert to another unit, if a unit has been defined as part of the type on the underlying container being queried.
1 - 10 elementsBuild a new query by combining other queries, using boolean operators. We support the and, or, and
not boolean operators.
- and
- or
- not
- equals
- in
- range
- prefix
- exists
- containsAny
- containsAll
- matchAll
- nested
- overlaps
- hasData
- instanceReferences
{
"and": [
{
"in": {
"property": ["tag"],
"values": [10011, 10011]
}
},
{
"range": { "property": ["weight"], "gte": 0 }
}
]
}
Should we return property type information as part of the result?
5Controls how multiple search terms are combined when matching documents.
-
OR (default): A document matches if it contains any of the query terms in the searchable fields. This typically returns more results but with lower precision.
-
AND: A document matches only if it contains all of the query terms across the searchable fields. This typically returns fewer results but with higher relevance.
AND, OR Limits the number of results to return.
1 <= x <= 1000