Hi all,
I'm trying to get Hibernate Search to work for my webapp in Spring (Hibernate 3.2.5 with Search 3.0.0 GA) but only had it to work in tests where I manually index my objects. In my webapp my objects are not added to the index even though I registered these listeners (I'm not using annotations for Hibernate mapping):
Code:
<event type="post-update">
<listener class="org.hibernate.search.event.FullTextIndexEventListener"/>
</event>
<event type="post-insert">
<listener class="org.hibernate.search.event.FullTextIndexEventListener"/>
</event>
<event type="post-delete">
<listener class="org.hibernate.search.event.FullTextIndexEventListener"/>
</event>
Now I know these listeners are started because I see this in my logs:
Code:
4-8-08 23:00:35 main DEBUG org.hibernate.cfg.Configuration - Event listeners: post-update=org.hibernate.search.event.FullTextIndexEventListener
4-8-08 23:00:36 main DEBUG org.hibernate.cfg.Configuration - Event listeners: post-insert=org.hibernate.search.event.FullTextIndexEventListener
4-8-08 23:00:36 main DEBUG org.hibernate.cfg.Configuration - Event listeners: post-delete=org.hibernate.search.event.FullTextIndexEventListener
4-8-08 23:00:37 main DEBUG org.hibernate.cfg.Configuration - Event listeners: post-update=org.hibernate.search.event.FullTextIndexEventListener
4-8-08 23:00:37 main DEBUG org.hibernate.cfg.Configuration - Event listeners: post-insert=org.hibernate.search.event.FullTextIndexEventListener
4-8-08 23:00:37 main DEBUG org.hibernate.cfg.Configuration - Event listeners: post-delete=org.hibernate.search.event.FullTextIndexEventListener
But like I said nothing is indexed. Could it be related to the fact that nothing is actually inserted, updated or deleted when I test my webapp, only created? See the following from my logs:
Code:
4-8-08 23:02:15 btpool0-3 DEBUG org.hibernate.event.def.AbstractSaveEventListener - executing identity-insert immediately
4-8-08 23:02:15 btpool0-3 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - processing flush-time cascades
4-8-08 23:02:15 btpool0-3 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - dirty checking collections
4-8-08 23:02:15 btpool0-3 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - Flushed: 0 insertions, 0 updates, 0 deletions to 1 objects
4-8-08 23:02:15 btpool0-3 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - Flushed: 1 (re)creations, 0 updates, 0 removals to 1 collections
4-8-08 23:02:15 btpool0-3 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - processing flush-time cascades
4-8-08 23:02:15 btpool0-3 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - dirty checking collections
4-8-08 23:02:15 btpool0-2 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - processing flush-time cascades
4-8-08 23:02:15 btpool0-2 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - dirty checking collections
4-8-08 23:02:15 btpool0-3 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - Flushed: 0 insertions, 0 updates, 0 deletions to 1 objects
4-8-08 23:02:15 btpool0-3 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - Flushed: 0 (re)creations, 0 updates, 0 removals to 1 collections
4-8-08 23:02:15 btpool0-2 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - Flushed: 0 insertions, 0 updates, 0 deletions to 1 objects
4-8-08 23:02:15 btpool0-2 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - Flushed: 0 (re)creations, 0 updates, 0 removals to 1 collections
4-8-08 23:02:15 btpool0-3 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - processing flush-time cascades
4-8-08 23:02:15 btpool0-3 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - dirty checking collections
4-8-08 23:02:15 btpool0-2 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - processing flush-time cascades
4-8-08 23:02:15 btpool0-2 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - dirty checking collections
4-8-08 23:02:15 btpool0-3 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - Flushed: 0 insertions, 0 updates, 0 deletions to 1 objects
4-8-08 23:02:15 btpool0-3 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - Flushed: 0 (re)creations, 0 updates, 0 removals to 1 collections
4-8-08 23:02:15 btpool0-2 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - Flushed: 0 insertions, 0 updates, 0 deletions to 1 objects
4-8-08 23:02:15 btpool0-2 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - Flushed: 0 (re)creations, 0 updates, 0 removals to 1 collections
4-8-08 23:02:15 btpool0-3 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - processing flush-time cascades
4-8-08 23:02:15 btpool0-3 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - dirty checking collections
4-8-08 23:02:15 btpool0-2 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - processing flush-time cascades
4-8-08 23:02:15 btpool0-3 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - Flushed: 0 insertions, 0 updates, 0 deletions to 1 objects
4-8-08 23:02:15 btpool0-3 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - Flushed: 0 (re)creations, 0 updates, 0 removals to 1 collections
4-8-08 23:02:15 btpool0-2 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - dirty checking collections
4-8-08 23:02:15 btpool0-2 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - Flushed: 0 insertions, 0 updates, 0 deletions to 1 objects
4-8-08 23:02:15 btpool0-2 DEBUG org.hibernate.event.def.AbstractFlushingEventListener - Flushed: 0 (re)creations, 0 updates, 0 removals to 1 collections
Thanks and regards for any help,
Jeroen