" In Search 5, by default, when you call {{queryBuilder.keyword().onField( \ "myField \ " ).matching( <some value> )}}, the value is expected to be transformed by the field bridge before being used to create a predicate. When you call {{queryBuilder.keyword().onField( \ "myField \ " ).ignoreFieldBridge().matching( <some value> )}}, the field bridge is skipped.
In \r\n\r\nIn Search 6, until now, we did not use the bridge in the DSL. We should offer a way to do so.
We \r\n\r\nWe need to:
\r\n\r\n # Decide which APIs to use to enable/disable the use of field bridges in the predicate DSL. {{.ignoreFieldBridge}} is not a good name anymore since we don't have a {{FieldBridge}} class anymore, and we could envision more \ "discoverable \ " APIs. For example we could expose {{onIndexField}} (bridge disabled) and {{onObjectProperty}} (bridge enabled). On the other hand we might want to have more than one bridge on a given property, so the property name alone probably isn't enough. Maybe {{onRawField}}/{{onBridgedField}}? {{onField().ignoreBridge()/onField()}}? \r\n # Decide how to allow bridges to implement this transformation. For {{ValueBridges}} it's simple, as they expose a method to transform a value to its indexed form. For other {{TypeBridge}} and {{PropertyBridge}} it's not as straightforward, because those bridges may manage multiple fields so a query on a given \ "object property \ " might require multiple queries on multiple fields. \r\n # Decide whether we want to rename the {{@Field}} annotation to something more consistent with the new name of the {{onXXX}} methods in the DSL. Maybe {{@ValueBridge}} would make more sense. Or maybe {{@MapToField}}, to highlight the fact the annotation is not about marking the object property as a \"field\", it's about mapping it to a field, which is separate from the object property.\r\n# Add support for the mapper to forward some information to the engine when bootstrapping, so that the predicate DSL (implemented in the engine, thus below the mapper) can somehow use bridges.
See \r\n\r\nSee https://docs.google.com/document/d/16PAa__LsxyLZcbW3q1MvgyIznh4ZnCYLupbNMXKMRds/edit?pli=1#
For \r\n\r\nFor tests, see: \r\n * Occurrences of the string “TODO rely on the bridge to convert to a String” in the showcase \r\n * Occurrences of the string “TODO rely on the bridge to split the String” in the showcase " |
|