[hibernate-dev] DocumentBuilder refactoring in Hibernate Search: how to deal (internally) with metadata

Gunnar Morling gunnar at hibernate.org
Thu May 30 09:13:38 EDT 2013


2013/5/30 Hardy Ferentschik <hardy at hibernate.org>

>
> On 30 Jan 2013, at 2:00 PM, Gunnar Morling <gunnar at hibernate.org> wrote:
>
> > I'm wondering how many node types there will be and how deep the
> hierarchy
> > actually is. If it is basically only something like BeanDescriptor and
> > PropertyDescriptor, is it really worth a visitor pattern?
>
> Right, my thinking as well.
>
> > On a more general note, would it make sense to have a joint meta model
> for
> > the different projects such as OGM and Search?
>
> No idea what model OGM needs, but I have a hard time seeing project
> specific meta data
> being shared. The information it provides it per definition very specific
> to the given
> project.
>

Right the metadata itself is project specific (that's what I meant by
"payload"), but the structure of the descriptor tree might be the same,
possibly allowing for re-use of code for model merges, model traversal (if
there is such thing) etc.

> This might help avoiding to write and maintain redundant code (e.g.
> merging
> > meta data from different sources) and also might be beneficial for the
> sake
> > of memory. Such a common model might have generic node types, to which
> the
> > different clients could attach specific payload.
>
> That sounds a little over engineered to me. Maybe if I would see some
> prototype code.
> But I am skeptical about this.
>
> > Note that I'm not sure whether that's a sound idea, just throwing it out
> :)
>
> Sure. np
>
> --Hardy


More information about the hibernate-dev mailing list