# Hashtag searches and Japanese full text search

**URL:** <https://discuss.elastic.co/t/hashtag-searches-and-japanese-full-text-search/347324>\
**Category:** Elasticsearch\
**Created:** [November 16, 2023, 11:57am UTC](https://discuss.elastic.co/t/hashtag-searches-and-japanese-full-text-search/347324 "2023-11-16T11:57:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hari-ram-s](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hari-ram-s/32/118759_2.png) [@hari-ram-s](https://discuss.elastic.co/u/hari-ram-s)\
**Post date:** [November 16, 2023, 11:57am UTC](https://discuss.elastic.co/t/hashtag-searches-and-japanese-full-text-search/347324/1 "2023-11-16T11:57:13Z")

</div>

We are trying to incorporate hashtag searches and Japanese full text searches in our data. We were able to achieve them separately but when we try to combine the two configs together, it doesn't work as expected.  
I found a similar thread here - [How can I correctly index @screen\_name, #hashtag and url in Japanese text?](https://discuss.elastic.co/t/how-can-i-correctly-index-screen-name-hashtag-and-url-in-japanese-text/147946). But no reply.  
PS: Our data will be stored in multiple languages.

Below are the configs that we used.

**Hashtag search:**

```auto
{
    "settings": {
        "index": {
            "analysis": {
                "filter": {
                    "hashtag_filter": {
                        "type": "word_delimiter",
                        "type_table": [
                            "# => ALPHA"
                        ]
                    }
                },
                "analyzer": {
                    "hashtag_analyzer": {
                        "type": "custom",
                        "tokenizer": "whitespace",
                        "filter": [
                            "lowercase",
                            "hashtag_filter"
                        ]
                    }
                }
            }
        }
    },
    "mappings": {
        "properties": {
            "caption": {
                "type": "text",
                "analyzer": "hashtag_analyzer"
            }
        }
    }
}

```

**CJK full text search:**

```auto
    "settings": {
        "index": {
            "analysis": {
                "analyzer": {
                    "kuromoji_analyzer": {
                        "char_filter": [
                            "icu_normalizer"
                        ],
                        "tokenizer": "kuromoji_tokenizer",
                        "filter": [
                            "kuromoji_baseform",
                            "kuromoji_part_of_speech",
                            "cjk_width",
                            "ja_stop",
                            "kuromoji_stemmer",
                            "lowercase"
                        ]
                    }
                }
            }
        }
    },
    "mappings": {
        "properties": {
            "caption": {
                "type": "text",
                "analyzer": "kuromoji_analyzer"
            }
        }
    }
}

```

**The two configs combined together, which doesn't seem to be working:**

```auto
{
  "settings": {
    "index": {
      "analysis": {
        "filter": {
          "hashtag_filter": {
            "type": "word_delimiter",
            "type_table": [
              "# => ALPHA"
            ]
          }
        },
        "analyzer": {
          "kuromoji_hashtag_analyzer": {
            "char_filter": [
              "icu_normalizer"
            ],
            "type": "custom",
            "tokenizer": "kuromoji_tokenizer",
            "filter": [
              "kuromoji_baseform",
              "kuromoji_part_of_speech",
              "cjk_width",
              "ja_stop",
              "kuromoji_stemmer",
              "lowercase",
              "hashtag_filter"
            ]
          }
        }
      }
    }
  },
  "mappings": {
    "properties": {
      "caption": {
        "type": "text",
        "analyzer": "kuromoji_hashtag_analyzer"
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![hari-ram-s](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hari-ram-s/32/118759_2.png) [@hari-ram-s](https://discuss.elastic.co/u/hari-ram-s)\
**Post date:** [November 21, 2023, 6:11am UTC](https://discuss.elastic.co/t/hashtag-searches-and-japanese-full-text-search/347324/2 "2023-11-21T06:11:59Z")

</div>

Any help here?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 19, 2023, 6:12am UTC](https://discuss.elastic.co/t/hashtag-searches-and-japanese-full-text-search/347324/3 "2023-12-19T06:12:29Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
