This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| status: 500, | |
| statusText: 'Internal Server Error', | |
| headers: { | |
| date: 'Tue, 22 Oct 2024 11:05:10 GMT', | |
| 'content-type': 'application/json; charset=utf-8', | |
| 'content-length': '876', | |
| connection: 'keep-alive', | |
| 'x-powered-by': 'Express', | |
| 'access-control-allow-origin': '*', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DELETE /thairath | |
| PUT thairath | |
| { | |
| "settings": { | |
| "analysis": { | |
| "analyzer": { | |
| "trigrams": { | |
| "tokenizer": "trigram_tokenizer", | |
| "filter": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| POST /test/product/_search | |
| { | |
| "query": { | |
| "function_score": { | |
| "query": { "match": { "name" : "การ์ดแสดงผล"} }, | |
| "functions": [ | |
| { | |
| "filter": { "match": { "name": "ASUS" } }, | |
| "weight": 3 | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| GET /test/_analyze?pretty | |
| { | |
| "analyzer" : "analyzer_shingle", | |
| "text" : "วิรัช อยู่ยั่งยืน" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Tested with elasticsearch version 6.1.3 | |
| # Delete the existed one | |
| curl -XDELETE localhost:9200/test?pretty | |
| # Put new mapping | |
| curl -XPUT localhost:9200/test?pretty -H 'Content-Type: application/json' -d '{ | |
| "settings": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Tested with elasticsearch version 6.1.3 | |
| # Using ICU Analysis plugin, otherwise replace icu_tokenizer with thai in mapping part | |
| # Delete the existed one | |
| curl -XDELETE localhost:9200/test?pretty | |
| # Put new mapping | |
| curl -XPUT localhost:9200/test?pretty -H 'Content-Type: application/json' -d '{ |