12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- curl -XPUT http://127.0.0.1:9800/medical_dealer_v1 -d '{
- "settings": {
- "index": {
- "search": {
- "showlog": {
- "threshold": {
- "query": {
- "trace": "100ms"
- },
- "fetch": {
- "tract": "100ms"
- }
- }
- }
- },
- "analysis": {
- "analyzer": {
- "douhao": {
- "type": "pattern",
- "pattern": ","
- },
- "my_ngram": {
- "filter": [
- "lowercase"
- ],
- "tokenizer": "my_ngram"
- }
- },
- "tokenizer": {
- "my_ngram": {
- "token_chars": [
- "letter",
- "digit",
- "punctuation",
- "symbol"
- ],
- "min_gram": "2",
- "type": "nGram",
- "max_gram": "2"
- }
- }
- },
- "number_of_shards": "2",
- "number_of_replicas": "0"
- }
- },
- "mappings": {
- "medical_dealer": {
- "_id": {
- "path": "name_id"
- },
- "_all": {
- "enabled": false
- },
- "properties": {
- "id": {
- "type": "long"
- },
- "company_id": {
- "index": "not_analyzed",
- "type": "string"
- },
- "dealer_name": {
- "index": "not_analyzed",
- "type": "string",
- "fields": {
- "p_miname": {
- "analyzer": "my_ngram",
- "type": "string"
- }
- }
- },
- "area_code": {
- "index": "not_analyzed",
- "type": "string"
- },
- "city_code": {
- "index": "not_analyzed",
- "type": "string"
- },
- "district_code": {
- "index": "not_analyzed",
- "type": "string"
- }
- }
- }
- }
- }'
|