O'Reilly logo

Hibernate Search by Example by Steve Perkins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Field mapping options

In Chapter 1, Your First Application, we saw that member variables on a Hibernate-managed class are made searchable with the @Field annotation. Hibernate Search will put information about annotated fields into one or more Lucene indexes, using some sensible defaults.

However, you can customize indexing behavior in numerous ways, some of which are optional elements in the @Field annotation itself. Most of these elements will be explored further throughout this book, but we will briefly introduce them here in one centralized list:

  • analyze: This tells Lucene whether to store the field's data as is, or put it through analysis, parsing, and processing it in various ways. It can be set to Analyze.YES (the default) or Analyze.NO ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required