Chapter 3. Annotating Objects and Storing Indexes
3.1. Annotating Objects Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
Once indexing has been enabled, custom objects being stored in Red Hat JBoss Data Grid need to be assigned appropriate annotations.
As a basic requirement, all objects required to be indexed must be annotated with
@Indexed
In addition, all fields within the object that will be searched need to be annotated with
@Field.
For example:
For more useful annotations and options, see the JBoss Web Framework Kit Hibernate Search guide.