Skip to content

Instantly share code, notes, and snippets.

@AndrewVos
Created July 3, 2014 09:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndrewVos/8df362e94977f63ccff9 to your computer and use it in GitHub Desktop.
Save AndrewVos/8df362e94977f63ccff9 to your computer and use it in GitHub Desktop.
func RequestCreateProductIndex() error {
mappings := `
{
"mappings":{
"product":{
"properties":{
"name":{"type":"string","analyzer":"snowball"},
"price":{"type":"double","index":"not_analyzed"},
"saleprice":{"type":"double","index":"not_analyzed"},
"description":{"type":"string","analyzer":"standard"},
"retailer":{"type":"string","index":"not_analyzed"},
"currency":{"type":"string","analyzer":"keyword"},
"url":{"type":"string","index":"not_analyzed"},
"image":{"type":"string","index":"not_analyzed"},
"category":{"type":"string","index":"not_analyzed"},
"gender":{"type":"string","index":"not_analyzed"},
"stars":{"type":"integer","index":"not_analyzed"},
"ingested":{"type":"date"},
"clicks":{"type":"integer","index":"not_analyzed"}
}
}
},
"settings":{}
}`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment