I THINK this might be a bug? I've had troubles with how the Solr Managed
Synonym endpoint handles URL encoding of synonyms. It seems to be
impossible to delete a synonym which has a forward slash in it.

I have a synonym with a key of "Hot/Cold Pack" (that's the key that shows
up when I GET the managed synonyms, as it appears in the JSON response).

I've tried DELETE on several URLs, none of which work. Here's the sorts of
URLs I've tried:

   1. /synonyms/english/Hot%2FCold%20Pack - returns "Illegal character in
   path at index 84:
   
http://10.74.222.14:8983/solr/ca_gm_search/schema/analysis/synonyms/english/Hot/Cold
   Pack"
   2. /synonyms/english/Hot%252FCold%20Pack - returns "Illegal character in
   path at index 86:
   
http://10.74.222.14:8983/solr/ca_gm_search/schema/analysis/synonyms/english/Hot%2FCold
   Pack"
   3. /synonyms/english/Hot%252FCold%2520Pack - returns "
         No REST managed resource registered for path
   /schema/analysis/synonyms/english/Hot/Cold Pack"

My blind guess is that Solr Managed Synonym endpoint is not properly
decoding the request path. Either it stops decoding at %2F and complains
because no synonym matches "Hot%2FCold Pack", or it decodes the term to
"Hot/Cold Pack" and fails because it interprets "Hot" as a separate request
path node.

Should this be filed in the issue tracker or am I missing something? There
doesn't appear to be a workaround for this. Once you insert a synonym with
a forward slash, it's stuck for good (can't delete the endpoint and
re-create it because it's not allowed if it is in use, and there is no bulk
delete method).
-- 
*Kyle Hipke*
Software Engineer, Search and CMS Practices

*CIRRUS**10*
C: 206 316 9118
Cal: https://goo.gl/HwHA7K

Website
<http://www.cirrus10.com/?utm_source=signature&utm_medium=email&utm_content=website_link&utm_campaign=Cirrus10_sig>
 | LinkedIn <http://www.linkedin.com/company/cirrus10> | Email
<kyle.hi...@cirrus10.com>

Reply via email to