title: elasticsearch synonyms analyzer gives 0 results
body: <p>I am using <code>elasticsearch 7.0.0</code>.</p>
  
  <p>I am trying to work on <code>synonyms</code> with this configuration while creating <code>index</code>.</p>
  
  <pre><code>{
    "settings": {
      "index": {
        "analysis": {
          "analyzer": {
            "synonym": {
              "tokenizer": "whitespace",
              "filter": [
                "synonym"
              ]
            }
          },
          "filter": {
            "synonym": {
              "type": "synonym",
              "synonyms_path": "synonyms.txt"
            }
          }
        }
      }
    },
    "mappings": {
      "properties": {
        "address.state": {
          "type": "text",
          "analyzer": "synonym"
        },
        "location": {
          "type": "geo_point"
        }
      }
    }
  }
  </code></pre>
  
  <p>Here's a document inserted into the index:</p>
  
  <pre><code>{
    "name": "Berry's Burritos",
    "description": "Best burritos in New York",
    "address": {
      "street": "230 W 4th St",
      "city": "New York",
      "state": "NY",
      "zip": "10014"
    },
    "location": [
      40.7543385,
      -73.976313
    ],
    "tags": [
      "mexican",
      "tacos",
      "burritos"
    ],
    "rating": "4.3"
  }
  </code></pre>
  
  <p>Also content in <code>synonyms.txt</code>:</p>
  
  <pre><code>ny, new york, big apple
  </code></pre>
  
  <p>When I tried searching for anything in <code>address.state</code> property, I get <code>empty</code> result.</p>
  
  <p>Here's the query:</p>
  
  <pre><code>{
    "query": {
      "bool": {
        "filter": {
          "range": {
            "rating": {
              "gte": 4
            }
          }
        },
        "must": {
          "match": {
            "address.state": "ny"
          }
        }
      }
    }
  }
  </code></pre>
  
  <p>Even with <code>ny</code> (as it is:no synonym) in query, the result is empty.</p>
  
  <p>Before, when I created index without <code>mappings</code>, the query used to give the result, only except for synonyms.</p>
  
  <p>But now with <code>mappings</code>, the result is empty even though the term is present.</p>
  
  <p>This query is working though:
  {
    "query": {
      "query_string": {
        "query": "tacos",
        "fields": [
          "tags"
        ]
      }
    }
  }</p>
  
  <p>I looked and researched into many articles/tutorials and came up this far.</p>
  
  <p>What am I missing here now?</p>