-
Type: New Feature
-
Resolution: Unresolved
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: Builders
-
None
In JAVA-3879, we added expressions related to documents. Expressions that refer to fields, like `doc.getInteger("fieldName")`, are some of the most frequently-needed, but are also relatively verbose.
In our documentation, our examples generally extract these into variables, `var fieldName = ...`. This can be further moved into fields on a custom class, which allows for syntax like `doc.fieldName` or `doc.getFieldName()`. This approach runs into problems when the API itself needs to create such objects (for example, in `map(o -> ...)`, o would be a new instance of a particular object), but a POC created during the recent hackathon resolves these issues.
This would be a non-invasive addition to the API that would make it more accessible for users.
- is related to
-
JAVA-5080 Add chained wrappers for aggregation stages
- Backlog