Hi all,
I'm facing problem as mentioned in the subject.
We use following configuration: Hibernate 4.0.1.Final, HibernateSearch 4.0.0.Final in Glassfish 3.1.2 environment (JPA).
We used annotation based configuration of the HSearch in past and everything worked fine, but now we have to change it to programmatic configuration. So I created factory class that provides SearchMapping instance and registered this factory via 'hibernate.search.model_mapping' property in the persistence.xml file.
1) When using already created index files, searching works fine
2) When updating any existing entity (via merge operation) index files are not touched at all
3) When inserting new entity only 2 fields are inserted into index file: _hibernate_class and id column, even though 2 more columns are indexing-enabled
I checked log output and found info, that FullTextIndexEventListener was correctly activated:
INFO: DEBUG 11:37:02 Hibernate Search event listeners activated (org.hibernate.search.event.impl.FullTextIndexEventListener:147)
This is my config factory:
Code:
public final class SearchMappingConfiguration {
@Factory
public SearchMapping build() {
SearchMapping mapping = new SearchMapping();
mapping.entity(Prospect.class).indexed()
.property("lastUpdate", METHOD).field().name("lastUpdate").store(YES)
.property("name", METHOD).field().name("name");
}
}
The Prospect class is simple POJO class using only ejb3 annotations (defining @Id).
I have no idea what might be wrong and I expect that programmatic API shall work also in our environment :).
I really appreciate any hint or advice.
thanx