Created
October 16, 2017 14:14
-
-
Save randsina/fa598c81d9e8cfd4f547106c5ac68600 to your computer and use it in GitHub Desktop.
This file contains 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
curl -XPUT 'http://localhost:9200/bennett_test_data_feed_4' -d '{ | |
"settings" : { | |
"index" : { | |
"refresh_interval" : "-1", | |
"number_of_shards" : "3", | |
"query" : { | |
"default_field" : "offer_title" | |
}, | |
"analysis" : { | |
"filter" : { | |
"stemming" : { | |
"name" : "english", | |
"type" : "stemmer" | |
}, | |
"stopwords" : { | |
"type" : "stop", | |
"stopwords" : "_english_" | |
}, | |
"synonyms" : { | |
"type" : "synonym", | |
"synonyms" : [ "refurbished,condition", "used,condition", "smartphone=>phone", "jujube, ju ju be" ] | |
}, | |
"autocomplete_filter" : { | |
"type" : "edge_ngram", | |
"min_gram" : "1", | |
"max_gram" : "20" | |
} | |
}, | |
"analyzer" : { | |
"default" : { | |
"filter" : [ "standard", "lowercase", "stopwords", "synonyms", "stemmer" ], | |
"tokenizer" : "standard" | |
}, | |
"didYouMean" : { | |
"filter" : [ "lowercase", "stopwords" ], | |
"tokenizer" : "standard" | |
}, | |
"autocomplete_analyzer" : { | |
"filter" : [ "lowercase", "autocomplete_filter" ], | |
"type" : "custom", | |
"tokenizer" : "standard" | |
}, | |
"edgeNGramAnalyzer" : { | |
"filter" : [ "lowercase" ], | |
"tokenizer" : "edgeNGramTokenizer" | |
} | |
}, | |
"tokenizer" : { | |
"edgeNGramTokenizer" : { | |
"token_chars" : [ "letter", "digit", "punctuation" ], | |
"min_gram" : "1", | |
"type" : "edgeNGram", | |
"max_gram" : "10" | |
} | |
} | |
}, | |
"number_of_replicas" : "0" | |
} | |
}, | |
"mappings": { | |
"data_feed_item" : { | |
"_all" : { | |
"enabled" : false | |
}, | |
"properties" : { | |
"boost" : { | |
"type" : "double" | |
}, | |
"category" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"did_you_mean" : { | |
"type" : "string", | |
"analyzer" : "didYouMean" | |
}, | |
"manufacturer" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
}, | |
"copy_to" : [ "did_you_mean" ], | |
"analyzer" : "edgeNGramAnalyzer" | |
}, | |
"merchant" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
}, | |
"copy_to" : [ "did_you_mean" ] | |
}, | |
"offer_id":{ | |
"type":"string" | |
}, | |
"offer_description" : { | |
"type" : "string" | |
}, | |
"offer_title" : { | |
"type" : "string", | |
"fields" : { | |
"autocomplete" : { | |
"type" : "string", | |
"analyzer" : "autocomplete_analyzer", | |
"search_analyzer" : "standard" | |
} | |
}, | |
"copy_to" : [ "did_you_mean" ] | |
}, | |
"price" : { | |
"type" : "float" | |
}, | |
"shipping_rate" : { | |
"type" : "float" | |
}, | |
"source" : { | |
"type" : "integer" | |
}, | |
"sub_category" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"pner_category" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"brand" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"model" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"model_family" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"color" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"size" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"resolution" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"units" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"memory" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"weight" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"sex" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"quanity" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"for_kids" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"quantity" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"country" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"volume" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"voltage" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"part_number" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"material" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"purpose" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"title" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"year" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"style" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"other_feature" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"condition" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"target" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"power" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"speed" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"width" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"height" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
}, | |
"depth" : { | |
"type" : "string", | |
"fields" : { | |
"raw" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
} | |
} | |
} | |
} | |
} | |
} | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment