when synonym with 1+ words

(from github.com/bluelink8888)
Hello

I have a problem with synonym.
if i need a word in source like USA to convert to target United State of America
but i found out it doesn’t work in add item it into synonym.txt
it’s bug?

And i saw your doc in here http://fess.codelibs.org/10.1/admin/synonym-guide.html
can u tell me the word in target just can add one in a row?
Or can u tell me how to setting it ?

(from github.com/marevol)
Master data for dictionaries(including synonym) are managed in .configsync index.
Updating words in dictionary administrative page, updated data will be filled in elasticsearch’s dictionary files from .configsync index after a few minutes.

(from github.com/bluelink8888)
Thanks for reply.
But i think u did not answer my question.
My question is if i already update my synonym dictionaries, and check it in real file.
But i still cannot search United State when i type US to search.

What i expected is i set US in source and United State of America in target,
but i cannot type US to search data what contain United State of America.
And i found it out cause white space problem. Do u understand my problem?

(from github.com/marevol)
Did you reindex docs after updating dictionaries?

(from github.com/bluelink8888)
No. How do i reindex docs?
I was use Web Crawler to get my data. But i have no ideal reindex.
Can u tell me more about it?

(from github.com/marevol)
Re-run Default Crawler.
http://fess.codelibs.org/11.0/admin/scheduler-guide.html

If “Check Last Modified” is true, set it to false before starting crawler.

(from github.com/bluelink8888)
Thanks.
But after uncheck Last Modified in General Configuration page and re-run Default Crawler,
it’s still not work.
Maybe i should use es reindex?
Or what others can i do?

(from github.com/marevol)
You can check elasticsearch analyze api.
I added US to Source and United State of America to Target, and got both 2 tokens from US.

$ curl 'http://127.0.0.1:9201/fess.search/_analyze?pretty' -H 'Content-Type: application/json;charset=UTF-8' --data-binary '{"text":"US","analyzer":"standard_analyzer"}' 
{
  "tokens" : [
    {
      "token" : "us",
      "start_offset" : 0,
      "end_offset" : 2,
      "type" : "word",
      "position" : 0
    },
    {
      "token" : "united state of america",
      "start_offset" : 0,
      "end_offset" : 2,
      "type" : "word",
      "position" : 0
    }
  ]
}

(from github.com/bluelink8888)
Thanks for help.
This is mean i need add other analyze in that index?
And one more thing.
If i have other keyword like this, i should add tokens in same way?

For example i want set Hong Kong or HK to 香港, what is means Hong Kong in Chinese.
It’s same way to add token?

(from github.com/marevol)

This is mean i need add other analyze in that index?

No. Analyze API is tokens check api from a given text.
Fess uses Elasticsearch as Full Text Search Engine.
To customize a feature of full text search, you need to understand Analysis.

(from github.com/bluelink8888)
ok. i found out i was misunderstand your reply.
actually i got both two token too. but i use fess search doc still cannot find united state of america result.
let me tell again.

I was set synonym.txt, and i got both token too.
But when i use fess search want to search US and only got US result.
I was expected both US and united state of america.
I was try it on native es too.
According to this https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-tokenfilter.html
It’s work and got result i expected.
Do u know my problem???

(from github.com/marevol)
Could you provide steps to reproduce it?

https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-tokenfilter.html

Fess uses synonym tokenizer, not the above synonym token filter.

(from github.com/julianopcardoso)
I have the same problema here.
Here is my register:
Sourge: [marvel,mcu,marvel universe] Target: [marvel,mcu,marvel universe]
If I search “marvel” or “mcu” appears “marvel” and “mcu” in results but not “marvel universe”.
If I search “marvel universe” only appears “marvel universe”.

It is the same problem.

Could you help me?

(from github.com/marevol)
Did you do reindex in Maintenace page?

(from github.com/julianopcardoso)
Yes! I put all the synonyms together and reindexed in Maintanance page.

(from github.com/julianopcardoso)
I did it but didn´t work.

(from github.com/marevol)
I checked standard_analyzer in Analysis API, and could not reproduce it.

(from github.com/julianopcardoso)
I think I discovered the problem but I dont know how to resolve it.
The result is correct but it doesnt bring hightlighted in Fess Search interface!
But if I use elasticsearch API It works and brings the terms in “<em>” markup!

Could you help me?