Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support config overrides for domain classes #19

Open
pledbrook opened this issue Mar 27, 2012 · 0 comments
Open

Support config overrides for domain classes #19

pledbrook opened this issue Mar 27, 2012 · 0 comments

Comments

@pledbrook
Copy link
Contributor

At the moment, you have no control over the indexing of domain classes provided by plugins. It would be good to allow configuration options along the lines of:

elasticSearch {
    domain {
        comment = {
            root false
            only = ["body"]
            body name: "comment"
        }
        tag = true
        screencast = [only: ["title", "description"]]
    }
}

Each configuration setting of the form elasticSearch.domain.* would be one of a boolean, a map, or a closure just as with the searchable domain class property. But these configuration settings would override any value provided by the domain class property.

This will require a refactoring. I suggest changing ClosureSearchableDomainClassMapper to be SearchableDomainClassMapper and the class should delegate to separate BooleanSearchableConfig, MapSearchableConfig and ClosureSearchableConfig classes based on the type of the searchable property.

I'm not sure how best to handle the reading of the searchable property and the above configuration settings. They may overlap, but you may have some domain classes in the runtime configuration that don't have a searchable property and vise-versa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant