Skip to content

Instantly share code, notes, and snippets.

@Salinger
Last active January 3, 2018 11:56
Show Gist options
  • Save Salinger/3b6790cab3bb7cfa8832c96a90ccd62b to your computer and use it in GitHub Desktop.
Save Salinger/3b6790cab3bb7cfa8832c96a90ccd62b to your computer and use it in GitHub Desktop.
{
"settings": {
"analysis": {
"analyzer": {
"ngram_analyzer": {
"tokenizer": "ngram_tokenizer"
}
},
"tokenizer": {
"ngram_tokenizer": {
"type": "nGram",
"min_gram": "2",
"max_gram": "3",
"token_chars": [
"letter",
"digit"
]
}
}
}
},
"mappings": {
"restaurant": {
"properties": {
"restaurant_id": {
"type": "integer"
},
"name": {
"type": "text",
"analyzer": "ngram_analyzer"
},
"name_alphabet": {
"type": "text",
"analyzer": "ngram_analyzer"
},
"name_kana": {
"type": "text",
"analyzer": "ngram_analyzer"
},
"address": {
"type": "text",
"analyzer": "ngram_analyzer"
},
"description": {
"type": "text",
"analyzer": "ngram_analyzer"
},
"purpose": {
"type": "text",
"analyzer": "ngram_analyzer"
},
"category": {
"type": "text",
"analyzer": "whitespace"
},
"photo_count": {
"type": "integer"
},
"menu_count": {
"type": "integer"
},
"access_count": {
"type": "integer"
},
"closed": {
"type": "boolean"
},
"location": {
"type": "geo_point",
"store": "true"
}
}
},
"rating": {
"properties": {
"rating_id": {
"type": "integer"
},
"total": {
"type": "integer"
},
"food": {
"type": "integer"
},
"service": {
"type": "integer"
},
"atmosphere": {
"type": "integer"
},
"cost_performance": {
"type": "integer"
},
"title": {
"type": "text",
"analyzer": "ngram_analyzer"
},
"body": {
"type": "text",
"analyzer": "ngram_analyzer"
},
"purpose": {
"type": "text",
"analyzer": "ngram_analyzer"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment