# Try to search with Synonyms in "Thai Word"

**URL:** https://discuss.elastic.co/t/try-to-search-with-synonyms-in-thai-word/157523
**Category:** Elasticsearch
**Created:** [November 20, 2018, 11:21am UTC](https://discuss.elastic.co/t/try-to-search-with-synonyms-in-thai-word/157523 "2018-11-20T11:21:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Kittapas\_Jewjaitham](https://avatars.discourse-cdn.com/v4/letter/k/8dc957/32.png) [@Kittapas\_Jewjaitham](https://discuss.elastic.co/u/Kittapas_Jewjaitham)
#### Post date: [November 20, 2018, 11:21am UTC](https://discuss.elastic.co/t/try-to-search-with-synonyms-in-thai-word/157523/1 "2018-11-20T11:21:08Z")

</div>

I'm using HPE CM with Elastic Search 5.6.3. and try to config elastic for archive synonym search.

This is my command used to created index :

```auto
PUT /hpecm_dev
{
  "settings": {
    "analysis": {
      "filter": {
        "drm_synonyms": {
          "type": "synonym",
          "synonyms_path": "synonyms.txt",
          "tokenizer": "icu_tokenizer"
        }
      },
      "analyzer": {
        "thai_tokenizer": {
          "type": "custom",
          "tokenizer": "icu_tokenizer",
          "filter": ["lowercase", "drm_synonyms"]
        }
      }
    }
  },
  "mappings": {
    "user": {
      "properties": {
        "LoginDetails": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "SecurityKeys": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        }
      }
    },
    "record": {
      "properties": {
        "Category": {
          "type": "text",
          "analyzer": "thai_tokenizer",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "Classification": {
          "properties": {
            "Name": {
              "type": "text",
              "analyzer": "thai_tokenizer"
            },
            "uri": {
              "type": "long"
            }
          }
        },
        "Contacts": {
          "properties": {
            "Name": {
              "type": "text",
              "analyzer": "thai_tokenizer"
            },
            "uri": {
              "type": "long"
            }
          }
        },
        "Container": {
          "properties": {
            "Name": {
              "type": "text",
              "analyzer": "thai_tokenizer"
            },
            "uri": {
              "type": "long"
            }
          }
        },
        "Contents": {
          "properties": {
            "Document": {
              "properties": {
                "Content": {
                  "type": "text",
                  "fields": {
                    "exact": {
                      "type": "text",
                      "analyzer": "standard"
                    }
                  },
                  "analyzer": "thai_tokenizer"
                },
                "Path": {
                  "type": "text",
                  "fields": {
                    "keyword": {
                      "type": "keyword",
                      "ignore_above": 256
                    }
                  }
                }
              }
            }
          }
        },
        "ConversationId": {
          "type": "text"
        },
        "DatabaseId": {
          "type": "text"
        },
        "DateCreated": {
          "type": "date",
          "format": "yyyy-MM-dd HH:mm:ss"
        },
        "DateRegistered": {
          "type": "date",
          "format": "yyyy-MM-dd HH:mm:ss"
        },
        "DeleteThisRecordAfter50Days": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "Extension": {
          "type": "text"
        },
        "ExternalReference": {
          "type": "text"
        },
        "FolderID": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "Notes": {
          "type": "text",
          "analyzer": "thai_tokenizer"
        },
        "Number": {
          "type": "text"
        },
        "OriginatedFrom": {
          "properties": {
            "Name": {
              "type": "text",
              "analyzer": "thai_tokenizer"
            },
            "uri": {
              "type": "long"
            }
          }
        },
        "OwnerLocation": {
          "properties": {
            "Name": {
              "type": "text",
              "analyzer": "thai_tokenizer"
            },
            "uri": {
              "type": "long"
            }
          }
        },
        "PartID": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "SecurityLocks": {
          "type": "text"
        },
        "Title": {
          "type": "text",
          "analyzer": "thai_tokenizer"
        },
        "uri": {
          "type": "long"
        }
      }
    }
  }
}

```

And I already put "synonyms.txt" at D:\Program Files\Elastic\Elasticsearch\config. For the example synonym word that i put in .txt file as the following :

ธนาคารแห่งประเทศไทย,ธปท.,Bank of Thailand,BOT,แบงค์ชาติ  
สกุลเงินดิจิทัล,Cryptocurrency,Cryptocurrencies,Cryptocurrencies,คริปโตเคอเรนซี

So, Please help or suggest me some solution.

Thanks a lot

---

<div class="post-metadata">

### Author: ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)
#### Post date: [November 23, 2018, 2:55pm UTC](https://discuss.elastic.co/t/try-to-search-with-synonyms-in-thai-word/157523/2 "2018-11-23T14:55:50Z")

</div>

> [@Kittapas\_Jewjaitham](#):
>
> So, Please help or suggest me some solution.

What might your problem be?

---

<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 21, 2018, 2:55pm UTC](https://discuss.elastic.co/t/try-to-search-with-synonyms-in-thai-word/157523/3 "2018-12-21T14:55:51Z")

</div>

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