title: elasticsearch multi-token keyword synonyms
body: <p>I'm trying to implement simple multi-token synonyms in Elasticsearch, but not getting the results I expect.  Here's some curl:</p>
  
  <pre><code>curl -XPOST "http://localhost:9200/test" -d'
  {
    "mappings": {
      "my_type": {
        "properties": {
          "blah": {
            "type": "string",
            "analyzer": "my_synonyms"
          }
        }
      }
    },
    "settings": {
      "index": {
        "analysis": {
          "filter": {
            "my_syn_filt": {
              "type": "synonym",
              "synonyms": [
                "foo bar, fooo bar"
              ]
            }
          },
          "analyzer": {
            "my_synonyms": {
              "filter": [
                "lowercase",
                "my_syn_filt"
              ],
              "tokenizer": "keyword"
            }
          }
        }
      }
    }
  }'
  </code></pre>
  
  <p>Index a few documents:</p>
  
  <pre><code>curl -XPUT localhost:9200/test/my_type/1 -d '{"blah": "fooo bar"}'
  curl -XPUT localhost:9200/test/my_type/2 -d '{"blah": "fooo barr"}'
  curl -XPUT localhost:9200/test/my_type/3 -d '{"blah": "foo bar"}'
  </code></pre>
  
  <p>Now query:</p>
  
  <pre><code>curl -XPOST "http://localhost:9200/test/_search" -d'
  {
    "query": {
      "match": {
        "blah": "foo bar"
      }
    }
  }'
  </code></pre>
  
  <p>I'm expecting to get back documents 1 and 3, however, only get back 3.   Does anyone know what the problem could be?</p>
  
  <p>Upon further inspection I'm also not getting the expected tokens when calling the analyzer directly:</p>
  
  <pre><code>curl 'localhost:9200/test/_analyze?analyzer=my_synonyms' -d 'fooo bar'
  </code></pre>
  
  <p>Returns only one token, "fooo bar", when I'm expecting two tokens: "fooo bar" and "foo bar".</p>