123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- curl -XPUT http://127.0.0.1:19800/supplyinfo_v1 -d '
- {
- "settings": {
- "index": {
- "analysis": {
- "analyzer": {
- "my_ngram_title": {
- "filter": [
- "lowercase"
- ],
- "tokenizer": "my_ngram_title"
- },
- "my_ngram": {
- "filter": [
- "lowercase"
- ],
- "tokenizer": "my_ngram"
- }
- },
- "tokenizer": {
- "my_ngram_title": {
- "token_chars": [
- "letter",
- "digit",
- "punctuation",
- "symbol"
- ],
- "min_gram": "1",
- "type": "nGram",
- "max_gram": "1"
- },
- "my_ngram": {
- "token_chars": [
- "letter",
- "digit",
- "punctuation",
- "symbol"
- ],
- "min_gram": "2",
- "type": "nGram",
- "max_gram": "2"
- }
- }
- },
- "number_of_shards": "20",
- "number_of_replicas": "0"
- }
- },
- "mappings": {
- "supplyinfo": {
- "transform": {
- "lang": "groovy",
- "script": "ctx._source[\"id\"] = ctx._source[\"_id\"]"
- },
- "_id": {
- "path": "_id"
- },
- "_all": {
- "enabled": false
- },
- "properties": {
- "msg_type": {
- "index": "not_analyzed",
- "type": "string"
- },
- "title": {
- "analyzer": "my_ngram_title",
- "type": "string",
- "fields": {
- "mtitle": {
- "index": "not_analyzed",
- "type": "string"
- }
- }
- },
- "id": {
- "index": "not_analyzed",
- "type": "string"
- },
- "detail": {
- "analyzer": "my_ngram",
- "type": "string"
- },
- "validity_time": {
- "type": "long"
- },
- "create_time": {
- "type": "long"
- },
- "publish_time": {
- "type": "long"
- },
- "province": {
- "index": "not_analyzed",
- "type": "string"
- },
- "city": {
- "index": "not_analyzed",
- "type": "string"
- },
- "ent_name": {
- "analyzer": "my_ngram_title",
- "type": "string"
- },
- "ent_id": {
- "index": "not_analyzed",
- "type": "string"
- }
- }
- }
- }
- }'
|