Predicate Types
| Type | Description | Operators |
|---|---|---|
| Binary predicate | Compares a property value against a constant using a comparison operator | eq, ne, gt, ge, lt, le, contains |
| Composite predicate | Combines multiple predicates with logical AND or OR | and, or |
| Unary predicate | Negates a predicate | not |
Binary Predicate Syntax
A binary predicate compares a single entity property against a value:Supported Binary Operators
| Operator | Alias | Type Support | Description |
|---|---|---|---|
eq | == | String, number, boolean | Exact equality comparison. Case-sensitive for strings. |
ne | != | String, number, boolean | Inequality comparison. |
gt | > | Number, date | Greater than. Works with Integer, Double, Long. |
ge | >= | Number, date | Greater than or equal. |
lt | < | Number, date | Less than. |
le | <= | Number, date | Less than or equal. |
contains | — | String | Substring matching. Case-sensitive. |
Examples
Equality:Null Predicates
Check for property presence or absence:Composite Predicates
AND Predicate
All conditions must match:OR Predicate
Any condition may match:Nested Composites
AND and OR predicates can be nested for complex logic:Each operand in AND/OR arrays is parenthesized during Lucene translation to maintain correct precedence.
Unary NOT Predicate
Negates any predicate:ObjectId Predicates
Query by Polarion work item ID:project/id expands to a compound query: project.id:"myProject" AND id:"UN-001".
Data Property Predicates
Predicates on entity data properties are validated against the entity type schema before execution. Only scalar (non-navigation) properties are supported in direct predicates. Navigation property filtering uses the constraint system. See Document Filtering and Project Scoping.Document and Project Predicates
Document and project predicates filter by navigation properties:Document and project predicates are extracted and processed separately from data property predicates. They are resolved and validated against the Document and Project entity type metadata respectively.
Query Execution Methods
The query engine provides filtering operations on entity collections:| Method | Description |
|---|---|
filter() | Returns all entities matching the predicate |
count() | Returns the count of matching entities without loading them |
any() | Returns true if at least one entity matches (short-circuit) |
all() | Returns true if every entity matches |
Complete YAML Example
Related Pages
- Operators — full operator reference
- EntityQuery — top-level query structure
- Lucene Integration — predicate-to-Lucene translation
- Query Splitting — server vs. in-memory predicate execution
Sources: Code: Query.java, QueryExecutorTest.java, QueryToLuceneTest.java, PolarionQueryProcessor.java, odata-where-merger.test.ts
Sources
Sources
Source Code
Query.javaQueryExecutorTest.javaprod-powersheet-src/com.nextedy.powersheet.client/ltc-repo/__tests__/odata-where-merger.test.tsPolarionQueryProcessor.javaQueryToLuceneTest.java