Combining phonetic filter with synonym_graph filter

So - I want to use the phonetic filter to transform the user query into phonetic hashes as it's supposed to do. F.ex. with "refined_soundex" i get:

pacemaker -> P103080309

Then I want to take this hash value to my synonyms file like:

P103080309 => heart pacemaker,ventricular pacing

The idea is that I get a sort of spell check on the user query but not on the synonyms and not in the index.

Trying to create this doesn't seem to be possible though:

  "index": {
    "analysis": {
      "analyzer": {
        "synonym_graph_analyzer_with_phonetics": {
          "filter": [
            "english_possessive_stemmer",
            "lowercase",
            "phonetic",
            "synonym"
          ],
          "tokenizer": "standard"
        }
      },
      "filter": {
        "english_possessive_stemmer": {
          "type":       "stemmer",
          "language":   "possessive_english"
        },
        "synonym": {
          "type": "synonym_graph",
          "synonyms_path": "elastic-synonyms-phonetic.txt"
        },
        "phonetic": {
          "type": "phonetic",
          "encoder": "refined_soundex" 
        }
      }
    }
  }

Throws an error:

"Token filter [phonetic] cannot be used to parse synonyms"

I actually don't understand the message. I'm not using the phonetic filter to parse synonyms. I'm using the filter to alter the user query BEFORE I send it to the synonyms filter.

Or?