[ 
https://issues.apache.org/jira/browse/SOLR-5654?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Steve Rowe updated SOLR-5654:
-----------------------------

    Attachment: SOLR-5654.patch

{quote}
Here's an updated patch that uses a custom SynonymMap.Parser implementation 
instead of the SolrResourceLoader adapter approach based on the excellent 
suggestion by Steve Rowe. The only caveat is this requires making the 
SynonymFilterFactory.loadSynonyms method protected instead of private, which 
seemed like a good trade-off for being able to plug-in a different parser 
implementation.
{quote}

Looks great, thanks for making this change.  I see no problem with making 
{{SynonymFilterFactory.loadSynonyms()}} protected.

{quote}
I've also improved the test logic to verify synonyms get applied correctly 
after core reload.
{quote}

Cool, good test addition.

The attached patch includes a {{CHANGES.txt}} entry and some minor cleanups:

* Removed the custom boolean parsing logic in 
{{ManagedSynonmyFilterFactory.getIgnoreCase()}} in favor of the new 
{{NamedList.getBooleanArg()}} method.
* Add missing braces around single-line statement blocks after {{if}} and 
{{for}}
* Added {{Locale.ROOT}} as the first arg to several {{String.format()}} 
invocations to make {{ant precommit}} calm down.
* Converted explicit types in generic constructor invocations to the diamond 
operator.
* Converted schema references to {{ManagedSynonymFilterFactory}} from using the 
full package to the short form prefix {{solr.}}. 

I think it's ready to go.  I'll commit to trunk shortly.

> Create a synonym filter factory that is (re)configurable, and capable of 
> reporting its configuration, via REST API
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-5654
>                 URL: https://issues.apache.org/jira/browse/SOLR-5654
>             Project: Solr
>          Issue Type: Sub-task
>          Components: Schema and Analysis
>            Reporter: Steve Rowe
>         Attachments: SOLR-5654.patch, SOLR-5654.patch, SOLR-5654.patch, 
> SOLR-5654.patch, SOLR-5654.patch
>
>
> A synonym filter factory could be (re)configurable via REST API by 
> registering with the RESTManager described in SOLR-5653, and then responding 
> to REST API calls to modify its init params and its synonyms resource file.
> Read-only (GET) REST API calls should also be provided, both for init params 
> and the synonyms resource file.
> It should be possible to add/remove/modify one or more entries in the 
> synonyms resource file.
> We should probably use JSON for the REST request body, as is done in the 
> Schema REST API methods.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to