Is there a way to dynamically update a synonym file without restarting Solr server?

前端 未结 2 2038
滥情空心
滥情空心 2020-12-28 10:46

As we know there is a synonym.txt file in conf directory, which I wanted to update whenever I found some new synonym words...

So is there any way to

2条回答
  •  暖寄归人
    2020-12-28 11:12

    Solr provides Managed Synonym Graph Filter to manage synonyms using a REST API (in this example via /solr/collection_name/schema/analysis/synonyms/english endpoint):

    
        
        
         
    
    
        
        
    
    

    A core reload is needed to apply synonyms changes. Solr provides a REST API for this too CoreAdmin API Reload admin/cores?action=RELOAD&core=core-name

    The RELOAD action loads a new core from the configuration of an existing, registered Solr core. While the new core is initializing, the existing one will continue to handle requests. When the new Solr core is ready, it takes over and the old core is unloaded.

提交回复
热议问题