2014-09-30 74 views
0

我正在使用bonsai.io,並且想將elasticsearch指向我的同義詞文件。Bonsai ElasticSearch + Heroku + Python - 同義詞文件的位置

我遵守了wn_s.pl文件夾中在Heroku和Django應用程序可以看到該文件:

>>> call(['ls', '-l', os.path.join(settings.BASE_DIR, 'data', 'wn_s.pl')]) 
-rwx------ 1 u37195 37195 7494480 2014-09-30 17:24 /app/data/wn_s.pl 

但是,當我與過濾器創建索引:

'filter': { 
      'my_filter': { 
         'type': 'synonym', 
         'format': 'wordnet', 
         'synonyms_path': os.path.join(settings.BASE_DIR, 'data', 'wn_s.pl') 
         } 
      } 

我得到的錯誤如下:

TransportError: TransportError(500, u'IndexCreationException[[article-index] failed to create index]; nested: FailedToResolveConfigException[Failed to resolve config path [/app/data/wn_s.pl], tried file path [/app/data/wn_s.pl], path file [/opt/elasticsearch/current/config/app/data/wn_s.pl], and classpath]; ') 

我該如何解決它?

由於

回答