java - How to do indexing in hibernate3 -
i newbie hibernate framework.to increase performance of searching in project want index tables columns.as per research,hibernate automatically indexes when performing crud operations via criteria.so way tune search faster in hibernate , creating index externally increase performance of search?
any idea appreciated!!!
url:
http://hibernate.org/search/documentation/getting-started/#define-which-entities-need-to-be-indexed
can give details on indexing n hibernate.
below snippet link. furter reading, please refer link.
the annotation @indexed marks book entity needs indexed hibernate search.
package example; ... @entity @indexed public class book { @id @generatedvalue private integer id; @field(index=index.yes, analyze=analyze.yes, store=store.no) private string title; @field(index=index.yes, analyze=analyze.yes, store=store.no) private string subtitle; @field(index=index.yes, analyze=analyze.no, store=store.yes) @datebridge(resolution=resolution.day) private date publicationdate; @indexedembedded @manytomany private set<author> authors = new hashset<author>(); public book() { } // standard getters/setters follow here ... }
Comments
Post a Comment