I think development might be inactive on this plugin. Out of interested I use Searchable very successfully:
BuildConfilg.groovy:
plugins { ...
compile ":searchable:0.6.6"
In your domain class:
class Article {
String headline
String extract
static searchable = {
only = ['headline', 'extract']
headline boost: 2.0, spellCheck: 'include'
extract boost: 1.7, spellCheck: 'include'
}
...
}
To index in a Service:
def searchableService
...
searchableService.index()
}
Edit:
The spellcheck add the facility to provide suggested searches if you misspelled the search term:
def suggestedQuery = searchableService.suggestQuery(searchTerm)
To search for a term
def searchResult = searchableService.search("dog", options)
To match with similar word "cycle" or "cycling" append ~ on to the serach term
def searchResult = searchableService.search("cycle~", options)
The options here also allow you to highlight search terms in the result
options.withHighlighter = textHighlighter