Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Support for @Fields annotation #13

mcleanl opened this Issue · 1 comment

1 participant


In previous projects I have used hibernate search annotations to add one attribute to multiple fields (for different purposes eg. sorting, searching, projections).

@Fields({ @Field(index = Index.TOKENIZED, store = Store.YES),
@Field(name = "simple_search", index = Index.TOKENIZED) })
private String description

When I do that using the plugin it results in the following error

unexpected token: @ @ line 16, column 2

I see no example of the @Fields annotation in the documentation. Is it possible?


l could not find a way to do it with annotations without error (grails 2.1.1) but the following works. List the same field (value) multiple times and specifying the name attribute on all but the default index entry (which is stored in this example for using as a projection)

static search = {
// fields
value (index: 'tokenized', name:'simple_search')
value (index: 'un_tokenized', store : 'yes')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.