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 Search 6, until now, we did not use the bridge in the DSL, even We need to:
- 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()?
- 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.
- 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 https://docs.google.com/document/d/16PAa__LsxyLZcbW3q1MvgyIznh4ZnCYLupbNMXKMRds/edit?pli=1# |