|Work Item Title: |oneM2M Enhanced Filter and Queries |
|Document Number |WI-0112 |
|Supporting Members or Partner type 2 |Deutsche Telekom, Orange, Sejong University, Exacta |
|Date: |2023-04-18 |
|Abstract: |This Work Item is intended to improve the current method of providing filters for queries in RETRIEVE and DISCOVERY operations. This improvement will also be applicable to other parts of the oneM2M specifications where similar attribute-based filters and queries are used. |
> **oneM2M Copyright statement**
> No part may be reproduced except as authorized by written permission.
> The copyright and the foregoing restriction extend to reproduction in all media.
> All rights reserved.
# 1 Title (Acronym)
oneM2M Enhanced Filters and Queries
# 2 Justification
Searching for resources with certain characteristics in a CSE's resource tree is currently done by providing a **Filter Criteria** in a RETRIEVE or DISCOVERY request. This is defined in TS-0001, 10.2.6 "Discovery-related Procedures".
Filtering is currently very limited:
- Only equality of attributes is generally supported
- "Greater", "less", "earlier", "later" for a small set of common and universal attributes. This makes, for example, querying of <flexContainer> specialization resources with comparison operators other than equality impossible.
- There is no support for filtering using complex attributes.
- Limited to either "AND", "OR", or "XOR" expressions when combining multiple comparisons.
Also, the growing number of **Filter Criteria** attributes makes it more and more difficult to support in implementations. A generic approach would make this more flexible.
Another problem is that similar functionality is now defined in different parts of the specifications. The <action> and <dependency> resource types defined a similar, though very limited, solution to filter on events. It does make sense to define a solution that could be applied to those cases as well to reduce the overhead in specification work, implementations, and for application development.
# 3 Intended Output
**Tick all the appropriate cases**
| Check | Case |
|:-:|-|
|X |Change request(s) to existing Technical Specification(s) |
| |Change request(s) to existing Technical Reports(s) |
| |New Normative Technical Specifications(s) |
| |New Permanent Technical Reports(s) |
| |New Temporary Technical Reports(s) |
# 4 Impact
## 4.1 oneM2M Work Items
None
# 5 Scope
The scope of this work item is to define an advanced and generic query method to filter resources, events etc in a oneM2M CSE to support RETRIEVE and DISCOVERY operations. It should also be applicable to other parts of the oneM2M specifications, such as in the procedures for, for example, <action> and <dependency> resource types where similar functionality is specified.
A solution could be the introduction of a simple but flexible query language based on s-expressions as presented in SDS-2022-0014R02 ("Improving Queries in Discovery and Retrieve Requests").
The solution must co-exist with the current filter methods, but may not be possible to avoid overlapping functionality since a new filter method will provide at least the same functionalities and more.
# 6 Schedule and impacted specifications
## 6.1 New Specifications (if any)
| Document<br/>Type | Document<br/>Number\* | Title | Schedule (TP No.)<br/>Start | Schedule (TP No.)<br/>Change Control | Schedule (TP No.)<br/>Freeze | Schedule (TP No.)<br/>Approval | Lead WG | Impacted WGs | Comments |