title: Elasticsearch - how to fuzzy match phrase when search keyword has no spaces?
body: <p>I want to match a document whose field <code>title</code> has value <code>brown fox</code> by searching with keyword <code>brownfox</code>.</p>
  
  <p>When trying this <code>fuzzy</code> query I get no results:</p>
  
  <pre><code>curl -XGET 'http://localhost:9200/haystack/_search?pretty' -d '{
      "query" : {
          "fuzzy" : {
              "title": {
                  "value": "brownfox",
                  "fuzziness": 2,
                  "prefix_length": 0,
                  "max_expansions": 10000
              }
          }
      }
  }'
  </code></pre>
  
  <p>I also tried a <code>match</code> query with fuzziness and operator <code>and</code>:</p>
  
  <pre><code>curl -XGET 'http://localhost:9200/haystack/_search?pretty' -d '{
      "query": {
        "match": {
          "title": {
            "query":     "brownfox",
            "fuzziness": "AUTO",
            "operator":  "and"
          }
        }
      }
  }'
  </code></pre>
  
  <p>This returns results with similar keywords, but not the document with title <code>brown fox</code> which I would consider a better match.</p>
  
  <p>I also read the answer to <a href="https://stackoverflow.com/questions/35416289/elasticsearch-how-to-find-phrases-if-query-has-no-spaces">this</a> SO question, but I don't have the option to update the analyzer of the field with synonyms, since I want to match other similar cases too, including both missing spaces and mis-spelled words.</p>
  
  <p>Thanks!</p>