title: elasticsearch multi-word keyword-tokenized synonym analysis
body: <p>I am trying to get keyword-tokenized multi-word synonyms working with the _analyze API.  The API is returning expected results for single-word synonyms, however, not for multi-word ones.  Here is my settings and analysis chain:</p>
  
  <pre><code>curl -XPOST "http://localhost:9200/test" -d'
  {
    "settings": {
      "index": {
        "analysis": {
          "filter": {
            "my_syn_filt": {
              "type": "synonym",
              "synonyms": [
                "foo bar, fooo bar", 
                "bazzz, baz"
              ]
            }
          },
          "analyzer": {
            "my_synonyms": {
              "filter": [
                "lowercase",
                "my_syn_filt"
              ],
              "tokenizer": "keyword"
            }
          }
        }
      }
    }
  }'
  </code></pre>
  
  <p>Now test using the _analyze API:</p>
  
  <pre><code>curl 'localhost:9200/test/_analyze?analyzer=my_synonyms&amp;text=baz'
  </code></pre>
  
  <p>The call returns what I expect (the same result is returned for 'bazzz' as well):</p>
  
  <pre><code>{
    "tokens": [
      {
        "position": 1,
        "type": "SYNONYM",
        "end_offset": 3,
        "start_offset": 0,
        "token": "bazzz"
      },
      {
        "position": 1,
        "type": "SYNONYM",
        "end_offset": 3,
        "start_offset": 0,
        "token": "baz"
      }
    ]
  }
  </code></pre>
  
  <p>Now when I try the same call with the multi-word synonym text the API only returns one token of type 'word', no synonyms:</p>
  
  <pre><code>curl 'localhost:9200/test/_analyze?analyzer=my_synonyms&amp;text=foo+bar'
  </code></pre>
  
  <p>(returns)</p>
  
  <pre><code>{
    "tokens": [
      {
        "position": 1,
        "type": "word",
        "end_offset": 7,
        "start_offset": 0,
        "token": "foo bar"
      }
    ]
  }
  </code></pre>
  
  <p>Why isn't the analyze API returning both "foo bar" AND "fooo bar" tokens with type SYNONYM?</p>