@Transient @Field and @ClassBridges mark methods and classes dirty by default because there is currently no way for HSearch to know which fields are managed here. In the case of @Transient @Field this will often be ok, because it will only lead to some superfluous extra indexing which is not a big hit on performance. However, a ClassBridge will mark all objects of a certain class as dirty and especially with Lazy connections, this can lead to a flurry of unnecessary database calls and indexing actions. Also with @Transient @Field this can occur when underlying Lazy connections are initialized.
HSEARCH-1093 talks about a way to improve this by indicating to HSearch which fields are actually managed by the Field (or ClassBridge) so as to prevent unnecessary invocations. I'm curious about ideas on this. Could this be an attribute, such as includePaths that overrides a default @Field(managedFields={"user.id"}) @ClassBridge(managedFields={"user.id","description"}) or could it be an annotation @DirtyAware(value={"user.id","description"}) _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev