Hi
Im trying with hibernate search functionality, hibernate search is working fine when i index string data type,
My POJO:
Code:
@Entity
@Indexed
public class ConferenceInfo implements java.io.Serializable {
@Id
@DocumentId
private String conferenceId;
@ContainedIn
private EventDb eventDb;
private String createdBy;
private Date dateCreated;
private String modifiedBy;
private Date dateModified;
@Field(index=Index.TOKENIZED, store=Store.NO)
private String theme;
@Field(index=Index.TOKENIZED, store=Store.NO)
private Clob overview;
@Field(index=Index.TOKENIZED, store=Store.NO)
private String trackOverview;
Im getting the error for the fields overview corresponding to the dataType clob.
Error:
Code:
org.hibernate.search.SearchException: Unable to guess FieldBridge for overview
at org.hibernate.search.bridge.BridgeFactory.guessType(BridgeFactory.java:180)
at org.hibernate.search.engine.DocumentBuilder.bindFieldAnnotation(DocumentBuilder.java:321)
at org.hibernate.search.engine.DocumentBuilder.initializeMember(DocumentBuilder.java:220)
at org.hibernate.search.engine.DocumentBuilder.initializeMembers(DocumentBuilder.java:167)
at org.hibernate.search.engine.DocumentBuilder.<init>(DocumentBuilder.java:94)
at org.hibernate.search.impl.SearchFactoryImpl.initDocumentBuilders(SearchFactoryImpl.java:262)
at org.hibernate.search.impl.SearchFactoryImpl.<init>(SearchFactoryImpl.java:94)
at org.hibernate.search.impl.SearchFactoryImpl.getSearchFactory(SearchFactoryImpl.java:172)
at org.hibernate.search.event.FullTextIndexEventListener.initialize(FullTextIndexEventListener.java:44)
at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:356)
at org.hibernate.cfg.Configuration.getInitializedEventListeners(Configuration.java:1304)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
at com.i3l.sample.test.Example.main(Example.java:60)
As specified in the hibernate search document,
Quote:
Then any property or field can use this bridge thanks to the @FieldBridge annotation
@FieldBridge(impl = PaddedIntegerBridge.class)
private Integer length;
should v write any stringBridge class for the clob and character datatype.
Any suggesstions pls come ahead. I really dont no how to do.
Thanks,
Ambika.