At 4:29 PM -0400 5/15/07, Yonik Seeley wrote:
>On 5/15/07, bhecht <[EMAIL PROTECTED]> wrote:
>>[...] the function parseRules in SynonymFilterFactory is private
>
>If you start using Solr's configuration, you drag more of Solr in.
>
>You can add the synonyms to the SynonymMap yourself, or if you want to
>use a solr-style synonyms.txt, perhaps just extract the code that
>implements that.

I don't want to be a troublemaker, but it could be argued that while the 
parsing of the param Map and calling of Config.getLines done by 
SynonymFilterFactory is both factory-specific and Solr-config-specific, that 
the actual parseRules should be a public static method within SynonymFilter 
itself -- changed to take an Iterator<String> rather than List<String> so it 
could be used with other sources -- since that would greatly simplify its 
adoption in other environments.  It's a rather useful tool.

(And yes I'd submit a patch...)

- J.J.

Reply via email to