Operator Categories
Comparison Operators
Comparison operators evaluate a property value against a constant.| Operator | Alias | Description | Supported Types |
|---|---|---|---|
eq | == | Equality. Case-sensitive for strings. | String, number, boolean |
ne | != | Inequality. | String, number, boolean |
gt | > | Greater than. | Number (Integer, Double, Long), date |
ge | >= | Greater than or equal. | Number, date |
lt | < | Less than. | Number, date |
le | <= | Less than or equal. | Number, date |
contains | — | Substring match. Case-sensitive. | String |
Equality (eq / ==)
title:"Safety Requirement".
Inequality (ne / !=)
NOT prefix syntax.
Greater Than (gt / >)
Greater than, less than, and range operators work with Integer, Double, and Long values. They are not applicable to string or boolean properties.
Less Than or Equal (le / <=)
Contains
Null Operators
Null checks useeq and ne with a null value:
| Expression | Lucene Translation | Description |
|---|---|---|
{ "prop": { "eq": null } } | NOT HAS_VALUE:prop | Property has no value |
{ "prop": { "ne": null } } | HAS_VALUE:prop | Property has a value |
HAS_VALUE pseudo-field is a Polarion-specific Lucene construct for checking property existence.
Logical Operators
Logical operators combine multiple predicates.AND (and / &&)
All sub-predicates must match:
(status:"approved") AND (priority:{2 TO *})
OR (or / ||)
Any sub-predicate may match:
(status:"draft") OR (status:"in_review")
NOT (not / !)
Negates a predicate:
Nested Composite Operators
AND and OR can be nested for complex filtering logic:(priority:[3 TO *]) AND ((status:"approved") OR (status:"in_review"))
Collection Operators
Collection operators evaluate predicates against multi-valued properties.| Operator | Alias | Description |
|---|---|---|
any | some | Returns true if any element in the collection matches the condition |
all | every | Returns true if all elements in the collection match the condition |
Collection operators are used for filtering across related entity collections. The exact query syntax for
any and all with nested property conditions depends on the entity type metadata.Lucene Translation Summary
| Query Operator | Lucene Output |
|---|---|
{ "name": "John" } | name:"John" |
{ "count": 5 } | count:5 |
{ "prop": { "ne": "X" } } | NOT prop:"X" |
{ "prop": { "eq": null } } | NOT HAS_VALUE:prop |
{ "prop": { "ne": null } } | HAS_VALUE:prop |
{ "and": [...] } | (...) AND (...) |
{ "or": [...] } | (...) OR (...) |
{ "not": {...} } | NOT (...) |
Where Clause Merging
When multiple filter conditions are combined (e.g., from user filters and configuration constraints), Powersheet merges them using these rules:- Two AND conditions: arrays are concatenated
- Two OR conditions: arrays are concatenated
- AND + OR: the OR is wrapped inside the AND
- Property conflicts: the second value overrides the first
- Empty/undefined conditions are ignored
Complete YAML Example
Related Pages
- Predicates — predicate structure and types
- EntityQuery — top-level query with where clause
- Lucene Integration — operator-to-Lucene translation details
- Function Expressions — functions for property transformation in queries
Sources: Code: Operator.java, QueryToLuceneTest.java, QueryExecutorTest.java, odata-where-merger.test.ts, parseConstraints.test.ts
Sources
Sources
Source Code
Operator.javaprod-powersheet-src/com.nextedy.powersheet.client/ltc-repo/__tests__/parseConstraints.test.tsGenericQueryResolver.javaQueryToLuceneTest.javaQueryProcessor.java