Sign in to edit and +1 items.
Login required
Download

Searchable Plugin

(35)
Used by approximately
5%
of Grails users
Author(s) Maurice Nicholson
Current Release 0.6.3   (9 months ago)
Grails Version 1.0 > * / <2.0.*
Tags compass  index  lucene  search 
Dependency
compile ":searchable:0.6.3"
Adds rich search functionality to Grails domain models. Built on Compass (http://www.compass-project.org/) and Lucene (http://lucene.apache.org/) This version is recommended for JDK 1.5+
Last updated by admin 3 years ago
Last updated by gorshing 1 year ago

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.

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.

Features

  • 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
Last updated by antony 1 year ago
I'm getting NonUniqueObject exceptions from the hibernate session when I try to save() my objects

This is probably because you have hasMany or belongsTo in your domain class. This is a known issue, and workarounds are available here until a fix is made: http://jira.codehaus.org/browse/GRAILSPLUGINS-601

Last updated by admin 3 years ago