Plugins You can find out about all the publicly available Grails plugins.

Searchable Plugin

48 votes

8% of Grails users

compile "org.grails.plugins:searchable:0.6.9"

 Documentation  Source  Issues


Adds rich search functionality to Grails domain models. Built on Compass ( and Lucene ( This version is recommended for JDK 1.5+


Use the above dependency declaration in your BuildConfig.groovy file and then add
mavenRepo ""
to the repositories section of that file.


Searchable Plugin

The Searchable Plugin brings rich search features to Grails applications with minimum effort, and gives you power and flexibility when you need it.

It is built on the fantastic Compass Search Engine Framework and Lucene and has the same license as Grails (Apache 2).

The roadmap and issues are tracked in JIRA.

Only versions 0.6.5+ work with Grails 2.3+.

Only versions 0.6.4+ work with Grails 2.2+.

Initially the plugin will focus on exposing Groovy domain models.

Support for Java domain classes is on the roadmap but until then, if your Grails application uses Java domain classes, using Compass's native annotations or XML mapping config and setting up Compass yourself may be a better fit at this stage.


  • Maps searchable domain classes to the underlying search index
  • Performs a bulk index of all searchable class instances in the database
  • Automatically synchronises any changes made through GORM/hibernate with the index
  • Provides a SearchableService for easy cross-domain-class searching and index management
  • Adds domain class methods for easy per-domain-class searching and index management
  • Provides a SearchableController and view for testing queries and demonstrating the Searchable Plugin API
  • Follows a Convention over Configuration approach with overridable behaviour where necessary

Table of Contents

  1. Quick start
  2. SearchableController and view
  3. Searching
    1. Query strings
    2. Query Builder
    3. Sorting
  4. Mapping
    1. Not All Properties
    2. Conventions
    3. Compass concepts
    4. Mapping DSL
    5. Class Property Mapping
    6. Searchable Id
    7. Searchable Property
    8. Searchable Reference
    9. Searchable Component
    10. Class Mapping
    11. Compass annotations
    12. Compass XML
  5. Managing the index
  6. Configuration
  7. Analyzers
  8. Converters
  9. Debugging
  10. FAQ
  11. Methods
    1. search
    2. countHits
    3. moreLikeThis
    4. suggestQuery
    5. termFreqs
    6. index
    7. unindex
    8. reindex
    9. rebuildSpellingSuggestions
    10. startMirroring
    11. stopMirroring
  12. Releases