-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: [HSearch] Programmatic API and not working FullTextIndexEven
PostPosted: Wed Apr 04, 2012 6:09 am 
Newbie

Joined: Wed Mar 08, 2006 11:12 am
Posts: 16
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.