Last updated by Shailen 5 years ago

Searchable Plugin - Searching

If you've outgrown the simple controller and view, you need the search API.

The plugin provides search methods with its SearchableService and also adds some to your searchable domain classes. The available methods are the same but the domain class methods restrict the search space to only that class (or hierarchy).

The methods are:

  • search - Find objects matching a query
  • countHits - Find the number of hits for a query
  • moreLikeThis - Finds similar objects to the indicated searchable domain class instance
  • suggestQuery - Suggest a new search query based on spelling
  • termFreqs - Returns term frequencies for the terms in the index