4

I want to use synonyms and stopwords file from a remote location and not necessarily from the config directory of elasticsearch. I tried doing this by giving a custom path in the json of the schema but i get a error

TransportError: TransportError(500, u'access_control_exception', u'access denied ("java.io.FilePermission" "E:\\tmp\\stopwords.txt" "read")')

The schema I have used is as below. Can this be done or do we always need to make sure the synonym and stopwords file are in the ES config directory.

{
  "settings": {
  "number_of_shards": 1,
  "analysis": {
  "analyzer": {
    "synonym": {
      "tokenizer": "standard",
      "filter": [
        "synonym",
        "stop_words",
        "lowercase"
      ]
    }
  },
  "filter": {
    "synonym": {
      "type": "synonym",
      "synonyms_path": ES_CONF_PATH+"synonyms.txt"
    },
    "stop_words": {
      "type": "stop",
      "stopwords_path": ES_CONF_PATH+"stopwords.txt"
    }
  }
  }
  }

0 Answers0