| WARNING: DO NOT IMPLEMENT YET - TO BE DISCUSSED. Use a more intuitive syntax, where methods are called on the document element being modified instead of the accessors. See https://github.com/hibernate/hibernate-search-6-poc/commit/f07d3c2a5278c8c1baaa32ef803e57d4d6653b79: This:
DocumentElement borrowalsObject = borrowalsObjectFieldAccessor.add( target );
shortTermBorrowalCountAccessor.write( borrowalsObject, shortTermBorrowalCount );
Would become this:
DocumentElement borrowalsObject = target.addNew( borrowalsObjectFieldReference );
borrowalsObject.add( shortTermBorrowalCountReference, shortTermBorrowalCount );
We may want to do the same for entity accessors, to be consistent. Note that in order for this to make sense, we would have to rename the "accessor" to a "reference" or some similar term expressing the fact that this object is "passive" by nature (on contrary to an "accessor"). |