mathpere / grails-hibernate-search-plugin

Integrates Hibernate Search features to Grails
http://grails.org/plugin/hibernate-search
Apache License 2.0
21 stars 18 forks source link

Just hide all the details like Searchable? #38

Closed aadrian closed 6 years ago

aadrian commented 6 years ago

Hi,

Any chance improving the "default usability" of this plug-in like the Searchable (only Grails 2) plug-in did?

http://gpc.github.io/searchable/index.html

The only minimal required config was to:

  1. include the plug-in

  2. define what domains to search with

    // in each domain
    static searchable = true

    or

    // in each domain with some fields excluded
    static searchable = [except: 'createdAt']
  3. and in Bootstrap:

    // in init method at the end:
    searchableService.startMirroring()
    searchableService.indexAll() 

    With only this, an out-of-the-box controller and view was available and good enough for most cases to do an application wide search - so up and usable in a few minutes for any existing application.

It's very useful that grails-hibernate-search-plugin allows such a great level of control, but for most use cases the defaults Searchable plug-in offered were just good enough.

Any chance offering something similar?

Thank you.

lgrignon commented 6 years ago

All of this sounds pretty good but I won't have time for such simplification. Honestly, minimal setup for grails-hibernate-search-plugin is pretty quick to achieve. Did you see my https://github.com/lgrignon/grails3-quick-start template?

grails-hibernate-search-plugin's README is comprehensive but the minimal setup only requires the static search closure and then query.

However, would you want to contribute? If you have time to work on a PR I could merge it very quickly.

Thanks anyway for your suggestion!