I'm currently using Hibernate Search 3.2.1, and have searched future versions and don't see support for more fine grained @IndexEmbedded options. I was wondering if anything is in the pipeline for this, or if it has been considered by rejected for some reason.
I find that entities that are referenced by a lot of different types I frequently don't want to index the same way, depending on what type is doing the referencing. Depth is a bit of a blunt tool to control this. Something like:
Code:
class A{
@IndexEmbedded(
paths={"d.one", "d.two"}
)
private C see;
}
class B{
@IndexEmbedded(
paths={"foo", "d.two"}
)
private C see;
}
class C{
@IndexEmbedded
private Collection<D> d;
@Field
private int foo;
}
class D{
@Field
int one;
@Field
int two;
}
Where both type A, and B want to index C, but they index different fields. This would also be a nice 'per path' way to control depth as opposed saying depth = N, and all properties are traversed until depth N is reached along each path. Which is the source of a lot of overkill indexing in our app. Especially if relationships are bi-directional and there is no way to have it stop if a cycle is formed.
Is something like this in the works? I know I'd probably replace every @IndexEmbedded(depth=N) in our app with this if it was available.
TIA for feedback.