lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kostiantyn (JIRA)" <>
Subject [jira] [Commented] (SOLR-8798) can't find cyrillic synonyms.
Date Wed, 16 Mar 2016 12:10:33 GMT


Kostiantyn commented on SOLR-8798:

Got teh same issue with Danish synonyms.

I think the original problem in API. According to documentation
the example request below will add new synonym mapping.
curl -X PUT -H 'Content-type:application/json' --data-binary '{"mad":["angry","upset"]}' "http://localhost:8983/solr/techproducts/schema/analysis/synonyms/english"
If after that I will execute this request,
curl -X PUT -H 'Content-type:application/json' --data-binary '{"mad":["insane"]}' "http://localhost:8983/solr/techproducts/schema/analysis/synonyms/english"
I will get result mapping merged:
If I need not merging but replacing, I have to at first delete the "mad" synonym at all and
then re-add it with new value.
curl -X DELETE -H 'Content-type:application/json' "http://localhost:8983/solr/techproducts/schema/analysis/synonyms/english/mad"
curl -X PUT -H 'Content-type:application/json' --data-binary '{"mad":["insane"]}' "http://localhost:8983/solr/techproducts/schema/analysis/synonyms/english"
That is how I could get replaced mapping:
In my opinion this API could not be considered as totally finished. There is must be a method
to update a synonym mapping also.
Problem comes when you have non latin symbols (Dannish example "åbningstider") or cyrillic
symbols as well.
In this case you cannot perform deletion command because Solr will return 404 status.
Example. Add first synonym mapping for the Danish word badroom "soveværelse"
curl -X PUT -H 'Content-type:application/json' --data-binary '{"soveværelse":["køkken"]}'
Than I need to replace mapping "køkken" (a kitchen) with "værelse" (a room). I cannot just
execute PUT request, it will merge "værelse" with existent "køkken" and I will get
But I actually need this
If I try to delete "soveværelse" I get an error 404 from Solr
 curl -X DELETE -H 'Content-type:application/json' --data-binary '{"mad":["angry","upset"]}'
    "msg":"sovev%C3%A6relse not found in /schema/analysis/synonyms/2",

> can't find cyrillic synonyms.
> --------------------------------------------------------------
>                 Key: SOLR-8798
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.9.1
>            Reporter: Vitalii
> RestManager doesn't work well with cyrillic symbols.
> I'm able to create new synonyms via REST interface. But I have an error when I try to
get created synonyns with via request:
> http://localhost:8983/solr/collection1/schema/analysis/synonyms/18/ліжко
> I get this message in console log:
> {code}
> # solr/console.log
> 4591823 [qtp1281335597-14] INFO  – Resource not found
for /schema/analysis/synonyms/18/%D0%BB%D1%96%D0%B6%D0%BA%D0%BE, looking for parent: /schema/analysis/synonyms/18
> {code}
> But in synonyms file I have row with this word:
> {code}
> # /solr/collection1/conf/_schema_analysis_synonyms_18.json
>   "initArgs":{"ignoreCase":false},
>   "initializedOn":"2016-03-07T11:57:00.116Z",
>   "updatedSinceInit":"2016-03-07T12:19:11.174Z",
>   "managedMap":{
>     "ліжко":["кровать"],
>     "стілець":["стул"]}}
> {code}
> This issue have been tested by multiple persons and they can confirm that faced this
problem too.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message