Skip to content

Instantly share code, notes, and snippets.

@ChrisMcKee
Last active August 29, 2015 14:08
Show Gist options
  • Save ChrisMcKee/c4cab45080e52e35190a to your computer and use it in GitHub Desktop.
Save ChrisMcKee/c4cab45080e52e35190a to your computer and use it in GitHub Desktop.
PUT /blurays
{
"settings": {
"analysis": {
"filter": {
"nGram_filter": {
"type": "nGram",
"min_gram": 2,
"max_gram": 20,
"token_chars": [
"letter",
"digit",
"punctuation",
"symbol"
]
}
},
"analyzer": {
"nGram_analyzer": {
"type": "custom",
"tokenizer": "whitespace",
"filter": [
"lowercase",
"asciifolding",
"nGram_filter"
]
},
"whitespace_analyzer": {
"type": "custom",
"tokenizer": "whitespace",
"filter": [
"lowercase",
"asciifolding"
]
}
}
}
},
"mappings": {
"movies": {
"_all": {
"index_analyzer": "nGram_analyzer",
"search_analyzer": "whitespace_analyzer"
},
"properties": {
"addToCartUrl": {
"type": "string",
"index": "no",
"include_in_all": false
},
"format": {
"type": "string",
"index": "not_analyzed"
},
"genre": {
"type": "string",
"index": "not_analyzed"
},
"image": {
"type": "string",
"index": "no",
"include_in_all": false
},
"mpaaRating": {
"type": "string",
"index": "not_analyzed",
"include_in_all": false
},
"name": {
"type": "string",
"index": "not_analyzed"
},
"plot": {
"type": "string",
"index": "no",
"include_in_all": false
},
"price": {
"type": "double",
"include_in_all": false
},
"quantityLimit": {
"type": "integer",
"include_in_all": false
},
"releaseDate": {
"type": "date",
"format": "yyyy-MM-dd"
},
"sku": {
"type": "string",
"index": "not_analyzed"
},
"studio": {
"type": "string",
"index": "not_analyzed"
}
}
}
}
}
{
state: opensettings: {
index: {
uuid: qZYDuZx0S8mn-24EqJH0PAanalysis: {
filter: {
nGram_filter: {
max_gram: 20min_gram: 2type: nGramtoken_chars: [
letterdigitpunctuationsymbol
]
}
}analyzer: {
nGram_analyzer: {
type: customfilter: [
lowercaseasciifoldingnGram_filter
]tokenizer: whitespace
}whitespace_analyzer: {
type: customfilter: [
lowercaseasciifolding
]tokenizer: whitespace
}
}
}number_of_replicas: 1number_of_shards: 5version: {
created: 1010199
}
}
}mappings: {
movies: {
properties: {
studio: {
index: not_analyzedtype: string
}genre: {
index: not_analyzedtype: string
}releaseDate: {
format: yyyy-MM-ddtype: date
}quantityLimit: {
include_in_all: falsetype: integer
}price: {
include_in_all: falsetype: double
}mpaaRating: {
include_in_all: falseindex: not_analyzedtype: string
}name: {
index: not_analyzedtype: string
}image: {
include_in_all: falseindex: notype: string
}addToCartUrl: {
include_in_all: falseindex: notype: string
}format: {
index: not_analyzedtype: string
}sku: {
index: not_analyzedtype: string
}plot: {
include_in_all: falseindex: notype: string
}
}_all: {
index_analyzer: nGram_analyzersearch_analyzer: whitespace_analyzer
}
}
}aliases: [
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment