title: Elasticsearch: Cannot search using Kuromoji reading form filter
body: <p>I'm using Elasticsearch 0.90.1 with Kuromoji plugin 1.4.0.</p>
  
  <pre><code>$ curl localhost:9200
  {
    "ok" : true,
    "status" : 200,
    "name" : "Agent Zero",
    "version" : {
      "number" : "0.90.1",
      "snapshot_build" : false,
      "lucene_version" : "4.3"
    },
    "tagline" : "You Know, for Search"
  }
  </code></pre>
  
  <p>I create a new index, using Kuromoji for my <code>default</code> analyzer:</p>
  
  <pre><code>$ curl -X PUT localhost:9200/test -d '{
    "index": {
      "analysis": {
        "filter": {
          "kuromoji_rf": {
            "type": "kuromoji_readingform",
            "use_romaji": "false"
          }
        },
        "tokenizer": {
          "kuromoji": {
            "type": "kuromoji_tokenizer"
          }
        },
        "analyzer": {
          "default": {
            "type": "custom",
            "tokenizer": "kuromoji",
            "filter": [
              "kuromoji_rf"
            ]
          }
        }
      }
    }
  }'
  </code></pre>
  
  <p>result:</p>
  
  <pre><code>{
    "ok": true,
    "acknowledged": true
  }
  </code></pre>
  
  <p>The reading form token filter seems to be working fine (kanji is normalized to katakana):</p>
  
  <pre><code>$ curl localhost:9200/test/_analyze -d '東京'
  </code></pre>
  
  <p>result:</p>
  
  <pre><code>{
    "tokens": [
      {
        "token": "トウキョウ",
        "start_offset": 0,
        "end_offset": 2,
        "type": "word",
        "position": 1
      }
    ]
  }
  </code></pre>
  
  <p>Index a document:</p>
  
  <pre><code>$ curl -X PUT localhost:9200/test/docs/1 -d '{
    "body": "これは関西国際空港です"
  }'
  </code></pre>
  
  <p>result:</p>
  
  <pre><code>{
    "ok": true,
    "_index": "test",
    "_type": "docs",
    "_id": "1",
    "_version": 1
  }%
  </code></pre>
  
  <p>The indexed document matches a wildcard query:</p>
  
  <pre><code>$ curl 'localhost:9200/test/docs/_search?q=body:*'
  </code></pre>
  
  <p>result:</p>
  
  <pre><code>{
    "took": 109,
    "timed_out": false,
    "_shards": {
      "total": 5,
      "successful": 5,
      "failed": 0
    },
    "hits": {
      "total": 1,
      "max_score": 1.0,
      "hits": [
        {
          "_index": "test",
          "_type": "docs",
          "_id": "1",
          "_score": 1.0,
          "_source": {
            "body": "これは関西国際空港です"
          }
        }
      ]
    }
  }
  </code></pre>
  
  <p>However, it doesn't match when I search using Japanese:</p>
  
  <pre><code>$ curl 'localhost:9200/test/docs/_search?q=body:空港'
  </code></pre>
  
  <p>result:</p>
  
  <pre><code>{
    "took": 21,
    "timed_out": false,
    "_shards": {
      "total": 5,
      "successful": 5,
      "failed": 0
    },
    "hits": {
      "total": 0,
      "max_score": null,
      "hits": []
    }
  }
  
  $ curl 'localhost:9200/test/docs/_search?q=body:クウコウ'
  </code></pre>
  
  <p>result:</p>
  
  <pre><code>{
    "took": 95,
    "timed_out": false,
    "_shards": {
      "total": 5,
      "successful": 5,
      "failed": 0
    },
    "hits": {
      "total": 0,
      "max_score": null,
      "hits": []
    }
  }
  
  $ curl 'localhost:9200/test/docs/_search?q=body:空'
  </code></pre>
  
  <p>result:</p>
  
  <pre><code>{
    "took": 22,
    "timed_out": false,
    "_shards": {
      "total": 5,
      "successful": 5,
      "failed": 0
    },
    "hits": {
      "total": 0,
      "max_score": null,
      "hits": []
    }
  }
  </code></pre>
  
  <p>I wondered if maybe the analyzer was not being used for the search query, but specifying the analyzer does not help:</p>
  
  <pre><code>$ curl 'localhost:9200/test/docs/_search?analyzer=default&amp;q=body:空港'
  </code></pre>
  
  <p>result:</p>
  
  <pre><code>{
    "took": 17,
    "timed_out": false,
    "_shards": {
      "total": 5,
      "successful": 5,
      "failed": 0
    },
    "hits": {
      "total": 0,
      "max_score": null,
      "hits": []
    }
  }
  </code></pre>
  
  <p>By the way, everything works fine if I disable the token filter.</p>
  
  <p>What am I doing wrong?</p>