123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- curl -XPUT http://127.0.0.1:9800/bidding_all -d '{
- "settings": {
- "index": {
- "search": {
- "showlog": {
- "threshold": {
- "query": {
- "trace": "100ms"
- },
- "fetch": {
- "tract": "100ms"
- }
- }
- }
- },
- "analysis": {
- "analyzer": {
- "my_ngram_title": {
- "filter": [
- "lowercase"
- ],
- "tokenizer": "my_ngram_title"
- },
- "douhao": {
- "type": "pattern",
- "pattern": ","
- },
- "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": "1",
- "number_of_replicas": "0"
- }
- },
- "mappings": {
- "bidding": {
- "transform": {
- "lang": "groovy",
- "script": "ctx._source[\"id\"] = ctx._source[\"_id\"]"
- },
- "_id": {
- "path": "_id"
- },
- "_all": {
- "enabled": false
- },
- "properties": {
- "projectname": {
- "index": "not_analyzed",
- "type": "string",
- "fields": {
- "pname": {
- "type": "string"
- }
- }
- },
- "id": {
- "index": "not_analyzed",
- "type": "string"
- },
- "title": {
- "analyzer": "my_ngram_title",
- "type": "string",
- "fields": {
- "mtitle": {
- "index": "not_analyzed",
- "type": "string"
- }
- }
- },
- "site": {
- "index": "not_analyzed",
- "type": "string"
- },
- "href": {
- "index": "not_analyzed",
- "type": "string"
- },
- "publishtime": {
- "type": "long"
- },
- "spidercode": {
- "index": "not_analyzed",
- "type": "string"
- },
- "extracttype": {
- "type": "long"
- }
- }
- }
- }
- }'
|