Search code examples
javahibernateindexingcompass-lucenesearchable

Compass SearchableDynamicProperty Issue


I have a project where I am using hibernate with compass for indexing, now everything is working fine with normal @SearchableProperty @SearchableCompoenet etc.

But I am facing problem when I have tried to implement @SearchableDynamicProperty.


Solution

  • Finally got the issues and resolved it...

    :: PROBLEM ::

    The insert statement was not performing inside single hibernate transaction, so that's why it was not being able to index the child table entries.

    ::RESOLUTION::

    After firing the insert statement on child tables, following statement (of course in synchronized state) will update the current compass indexes..

    compassGps.index(Test.class);