(Quick Reference)

1 Introduction - Reference Documentation

Authors: Matouš Kučera

Version: 0.5.0

1 Introduction

The Quick Search Plugin is the search implementation suitable for querying one domain class in one query. It supports search of domain class persistent properties as well as embedded and association properties. It is best suited for backend search where the user would like to search in a certain list of domain class objects without specifying which properties should be used for which kind of search. The complex search could be acomplished using Filter Pane Plugin.

1.1 Why New Search Plugin

There is certain amount of search and filtering plugins out there, so why we've implemented new one? I would like to list the reasons which we understand as the most important advantages of this plugin, however keep in mind, that different plugins are usually suitable for different situations.
  • Search setting should not be specified in domain classes - In my opinion, specifying the search options (properties which should be searched, the ordering parameters, etc.) should not be specified in domain classes (as most of the search plugin does). The domain class represents the model and the search is more view related, therefore it should be specified closer to the view level, i.e. in the controller.
  • Different search settings for different situations - In additional to above, the search could vary for same domain class list in different situations. The search engine should allow to set different search options though.
  • Let the programmer allow to influence the search - Sometimes the search should be constrained by programmer's specific code. Therefore, we allow to put a custom create criteria closure to the search query.

1.2 Change Log

DateVersionNotes
2015-01-080.5.0Fix parameter name customCriteria of searchService. This parameter was named customClosure before and it didn't correlate to documentation and common sense. This is a braking change if you have used customClosure attribute.
2014-12-160.4.0Introduce tokenWrapper property for not tokenizing query strings when tokenWrapper character is used to wrap the query. For more information see searchService.
2014-10-220.3.2Fix of autocomplete search with numbers.
2014-10-220.3.1Allow to search by primitive type numbers: int, long, etc.
2014-10-220.3Allow to search by domain class identifier in default search. Fix the default search to include also numbers of domain class.
2014-01-080.2.6SearchService.searchAutoComplete(): autocompleteTemplate attribute can use matchResults property in GString to display matched elements. For more information see searchService.
2014-01-080.2.5SearchService.searchAutoComplete(): autocompleteTemplate attribute can use matchResults property in GString to display matched elements. For more information see searchService.
2013-11-260.2.3Use left join for association queries in order to search for properties which has null reference.
2013-11-260.2Fix of configuration value loading.
2013-11-180.1Initial release. Search service for listing the result domain class objects.

1.3 Roadmap

  • Change the search engine to allow prioritizing the results based on programmer preferences and amount of matches.
  • Search in more domain classes.
  • Tag library for search form with support of autocomplete.