jprante / elasticsearch-plugin-bundle

A bundle of useful Elasticsearch plugins

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

plugin settings

esdee-git opened this issue · comments

commented

Hi
I try to add some custom settings for some of the plugins in the bundle, but can't understand how settings work.
For example to add custom setting to Decompounder, I go to DecompoundTokenFilterFactory and try to read my custom setting in createDecompounder(Settings settings).
But 'settings' always comes empty!?
What am I getting wrong?
Also if I add an existing property, e.g. subwords_only: true, it seems to be read by the plugin, but still the method createDecompounder the settings object is empty (I'm checking with settings.toDelimitedString)

Thanks for any hints!

It's not empty in DecompoundTokenFilterTests. Printing the settings give

[18:40:11,328][INFO ][org.xbib.elasticsearch.index.analysis.decompound.patricia.DecompoundTokenFilterFactory][main] settings = type=decompound 
[18:40:11,369][INFO ][org.xbib.elasticsearch.index.analysis.decompound.patricia.DecompoundTokenFilterFactory][main] settings = subwords_only=true type=decompound 
[18:40:11,401][INFO ][org.xbib.elasticsearch.index.analysis.decompound.patricia.DecompoundTokenFilterFactory][main] settings = respect_keywords=true type=decompound 
[18:40:11,409][INFO ][org.xbib.elasticsearch.index.analysis.decompound.patricia.DecompoundTokenFilterFactory][main] settings = respect_keywords=false type=decompound 
[18:40:11,704][INFO ][org.xbib.elasticsearch.index.analysis.decompound.patricia.DecompoundTokenFilterFactory][main] settings = index.version.created=5030099 
[18:40:12,277][INFO ][org.xbib.elasticsearch.index.analysis.decompound.patricia.DecompoundTokenFilterFactory][main] settings = type=decompound 
[18:40:12,295][INFO ][org.xbib.elasticsearch.index.analysis.decompound.patricia.DecompoundTokenFilterFactory][main] settings = index.version.created=5030099 

See the test resource src/test/resources/org/xbib/elasticsearch/index/analysis/decompound/patricia/keywords_analysis.json how to define settings.

commented

Thanks, Jörg! Found the problem in my code..