ElasticSearch fuzzy percolator query does not match
<p>Please explain to me the following problem:</p>

<p>Query with fuzziness 0 doesn't match. Why?</p>

<p>I have the mapping:</p>

<pre><code>$ curl -XGET 'http://localhost:9200/words/_mapping?pretty'
{
  "words" : {
    "mappings" : {
      ".percolator" : {
        "properties" : {
          "category" : {
            "type" : "string",
            "index" : "not_analyzed"
          },
          "fuzziness" : {
            "type" : "long"
          },
          "list" : {
            "type" : "string",
            "index" : "not_analyzed"
          },
          "query" : {
            "type" : "object",
            "enabled" : false
          }
        }
      },
      "query_doc" : {
        "properties" : {
          "category" : {
            "type" : "string",
            "index" : "not_analyzed"
          },
          "text" : {
            "type" : "string"
          }
        }
      }
    }
  }
}
</code></pre>

<p>I have the percolator queries:</p>

<pre><code>$ curl 'http://localhost:9200/words/.percolator/_search?pretty=true&amp;q=*:*'
{
  "took" : 4,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "failed" : 0
  },
  "hits" : {
    "total" : 2,
    "max_score" : 1.0,
    "hits" : [ {
      "_index" : "words",
      "_type" : ".percolator",
      "_id" : "id4_0",
      "_score" : 1.0,
      "_source" : {
        "query" : {
          "fuzzy" : {
            "text" : {
              "fuzziness" : 0,
              "value" : "Banes"
            },
            "category" : "cuba"
          }
        }
      }
    }, {
      "_index" : "words",
      "_type" : ".percolator",
      "_id" : "id4_1",
      "_score" : 1.0,
      "_source" : {
        "query" : {
          "fuzzy" : {
            "text" : {
              "fuzziness" : 1,
              "value" : "Banes"
            },
            "category" : "cuba"
          }
        }
      }
    } ]
  }
}
</code></pre>

<p>When I run the percolate query only the query with fuzziness 1 is matching:</p>

<pre><code>$ curl 'http://localhost:9200/words/query_doc/_percolate?pretty' -d '
{
    "doc": {
        "text": "Just Banes"
    }
}'
{
  "took" : 2,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "failed" : 0
  },
  "total" : 1,
  "matches" : [ {
    "_index" : "words",
    "_id" : "id4_1"
  } ]
}
</code></pre>

<p>What is wrong? Could someone explain this?</p>

<p>Thanks</p>