Hi all,
I'm very new to Hibernate search this is the first time I'm going to work with hibernate search. I have some experience in Hibernate.
The problem is like this.
I have configured the hibernate search with my .ear and annotated entity beans with the relevant annotations which are provided in the reference documentation.
This is the property configuration part in persistence.xml
Code:
[b]<property name="hibernate.search.default.directory_provider" value="org.hibernate.search.store.FSDirectoryProvider"/>
<property name="hibernate.search.default.indexBase" value="D:\HibernateSearch\indexes"/> [/b]
This is my entity bean (I included only the fields which are annotated for Hibernate Search)
Code:
@Entity
@Indexed(index="tblHotels")
@Role(name="roomsnet.r5.pojo.portal.TblHotels_hotelToBeMapped")
@Name("roomsnet.r5.pojo.portal.TblHotels")
@Table(name = "TBL_HOTELS", uniqueConstraints = {})
public class TblHotels implements java.io.Serializable {
....
....
....
@Column(name = "HOT_NAME", unique = false, nullable = false, insertable = true, updatable = true, length = 2000)
@Field(name="HotelName", index=Index.TOKENIZED, store=Store.YES)
public String getHotName() {
return this.hotName;
}
@Column(name = "HOT_DES", unique = false, nullable = true, insertable = true, updatable = true, length = 1500)
@Field(name="HotelDes", index=Index.TOKENIZED, store=Store.YES)
public String getHotDes() {
return this.hotDes;
}
}
1. I'm not doing any insert, update, delete records from the database using the entity bean. I do only the SELECT because in this application user search for hotels and we are returning the list of hotels according to the search word. It returns as the list of TblHotels objects.
Can I use Hibernate Search for such a scenario?
2. I have tried as mentioned in the Hibernate documentation but no indexes are created in the specified directory?
Please help me on this matter. Really appreciate your help.
Thanks and Regards
Lakshitha