let the mapping property name be configurable #17

Closed
musketyr opened this Issue Mar 17, 2014 · 5 comments

Projects

None yet

2 participants

we're creating grails plugin which should allow users to pick their own search plugin support and we want to provide integration with your plugin out of the box. we would like to declare the mappings in our domain classes but we don't want to use static searchable = ... property for this purpose, because other search plugins uses the same name. would be great if we can change the default property name to something like static elasticGormSearchable = ... so it won't conflict anymore and we can provide mapping for the old searchable plugin as well.

if making the property name configurable is way to much work would be nice if you provide few fallback aliases for that property out of box if the searchable property is not found on the domain class.

Owner
noamt commented Mar 18, 2014

Sounds interesting! Is there a github project?

Making the searchable property configurable shouldn't be too much bother, though I'd prefer that it's default value will remain searchable for backwards compatibility.

Yeah, it's https://github.com/MetadataRegistry/ModelCataloguePlugin/ (most recent work is in develop branch). My colleague will commit the elastic search plugin for it today. We had to use an ugly hack in plugin descriptor to reassign the static property values and it works but having the default fallback property will be much clearer solution.

Sure keeping searchable as default property name sounds good to me.

Actually, the alias property should have the priority. We're probably going to have searchable and elasticGormSearchable properties in the domain classes and it makes no difference if you prefer searchable in favor of the new alias

@noamt noamt added a commit that referenced this issue Mar 24, 2014
@noamt noamt #17 Configurable mapping property name:
* Property is made configurable by using the configuration key 'elasticSearch.searchableProperty.name'. Defaults to 'searchable'
e8bb334
@noamt noamt added a commit that referenced this issue Mar 24, 2014
@noamt noamt #17 Configurable mapping property name:
* Property is made configurable by using the configuration key 'elasticSearch.searchableProperty.name'. Defaults to 'searchable'
dfe1f95
@noamt noamt added a commit that referenced this issue Mar 24, 2014
@noamt noamt #17 Configurable mapping property name:
* Property is made configurable by using the configuration key 'elasticSearch.searchableProperty.name'. Defaults to 'searchable'
fe6153d
Owner
noamt commented Mar 24, 2014

Will be included in the next release.
Can be customized using the 'elasticSearch.searchableProperty.name' configuration.

@noamt noamt closed this Mar 24, 2014

wonderful, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment