healthonnet / hon-lucene-synonyms

Solr query parser plugin that performs proper query-time synonym expansion.
http://nolanlawson.com/2012/10/31/better-synonym-handling-in-solr
150 stars 67 forks source link

Need to handle configoverlay.json created by Solr's ConfigAPI #80

Open kevinlacire opened 7 years ago

kevinlacire commented 7 years ago

I experienced a pretty though to found bug caused by the configoverlay.json file generated when using Solr's ConfigAPI.

Long story short Solr configoverlay.json unmarshalling returns a LinkedHashMap not a NamedList, which makes the line always true so nothing more happen.

Plus, as the unmarshalling returns a map of type Map<String, Object>, I made a really simple method to do the conversion of main types to String.

kevinlacire commented 7 years ago

The part I don't like in my fix is the 'startsWith("filter")'. But I don't have much time to make it cleaner. Hope it helps.