elasticsearch-grails-plugin icon indicating copy to clipboard operation
elasticsearch-grails-plugin copied to clipboard

How to add other elasticsearch plugins?

Open abcfy2 opened this issue 9 years ago • 3 comments

I want to add a ik plugin for elasticsearch. How to do this?

Thanks.

abcfy2 avatar May 20 '15 09:05 abcfy2

Without deep understanding of ik and what I've briefly read about it, it seems it is an elasticserch plugin, not a grails plugin. You should be fine with installing ik with you Elasticsearch server (as you would do with any other plugin) and still use the grails plugin.

From what I've seen ik uses a custom analyzer and highlighting, these features are supported and documented here:

http://noamt.github.io/elasticsearch-grails-plugin/guide/mapping.html#classMapping http://noamt.github.io/elasticsearch-grails-plugin/guide/searching.html#highlighting

You can also use the elasticSearchService and elasticSearchAdminService to build bespoke queries on the Elasticsearch server.

marcoscarceles avatar May 20 '15 11:05 marcoscarceles

Thanks. The ik is a Chinese Word Segmentation plugin for elasticsearch. The grails plugin elasticsearch has a local mode for development. Is there any way to let local mode install plugins for local develop?

abcfy2 avatar May 20 '15 12:05 abcfy2

I found something in ClientNodeFactoryBean.groovy: def pluginsDirectory = elasticSearchContextHolder.config.path.plugins if(pluginsDirectory){ nb.settings().put('path.plugins', pluginsDirectory as String) }

which means, you can define a folder path of elasticsearch plugins in your config.groovy then you can copy your elasticsearch plugins into the folder. for example: elasticSearch.path.plugins = './elasticPlugins' then copy your ik plugin into the folder ./elasticPlugins

yoga1982 avatar Sep 24 '16 14:09 yoga1982