How can I fix the ElasticSearch kuromoji-readingform filter for Japanese fulltext search?

75 Views Asked by At

ElasticSearch Japanese fulltext kuromoji-readingform is not working

I have settings and query like this. My documents are "Medical development system" in three form of Japanese. When I search for "医療用システム開発" -> result must contains 3 documents but i got only 1 which I input

    PUT kuromoji_sample
    {
      "settings": {
        "index": {
          "analysis": {
            "analyzer": {
              "katakana_analyzer": {
                "tokenizer": "kuromoji_tokenizer",
                "filter": [ "katakana_readingform" ]
              }
            },
            "filter": {
              "katakana_readingform": {
                "type": "kuromoji_readingform",
                "use_romaji": false
              }
            }
          }
        }
      },
      "mappings": {
        "properties": {
          "overview":{
            "type": "text",
            "search_analyzer": "katakana_analyzer",
            "analyzer": "katakana_analyzer"
          }
        }
      }
    }
    
    
    POST _bulk 
    {"index": {"_index": "kuromoji_sample", "_id": 1}} 
    {"overview": "いりょうようしすてむかいはつ"} 
    {"index": {"_index": "kuromoji_sample", "_id": 2}} 
    {"overview": "イリョウヨウシステムカイハツ"} 
    {"index": {"_index": "kuromoji_sample", "_id": 3}} 
    {"overview": "医療用システム開発"} 
    
    
    
    
    GET kuromoji_sample/_search
    {
      "query": {
        "bool": {
          "should": [
            {"match": {
              "overview": "医療用システム開発"
            }}
          ]
        }
      }
    }
0

There are 0 best solutions below