Skip to content

Instantly share code, notes, and snippets.

@jillesvangurp
Created October 18, 2014 10:39
Show Gist options
  • Save jillesvangurp/d0cd29573b876f9cc4d3 to your computer and use it in GitHub Desktop.
Save jillesvangurp/d0cd29573b876f9cc4d3 to your computer and use it in GitHub Desktop.
user mapping
{
"settings": {
"number_of_shards": 5,
"index": {
"analysis": {
"filter": {
"edge_ngrams": {
"side": "front",
"max_gram": 8,
"min_gram": 2,
"type": "edgeNGram"
},
"max_token_length": {
"type": "length",
"max": 1000
}
},
"analyzer": {
"lowercaseonly": {
"type": "custom",
"tokenizer": "null_tokenizer",
"filter": [
"lowercase"
]
},
"ascii_ngrams_analyzer": {
"filter": [
"standard",
"lowercase",
"asciifolding",
"edge_ngrams",
"max_token_length"
],
"type": "custom",
"tokenizer": "standard"
},
"ngrams_analyzer": {
"filter": [
"standard",
"lowercase",
"edge_ngrams",
"max_token_length"
],
"type": "custom",
"tokenizer": "standard"
},
"default": {
"filter": [
"standard",
"standard",
"lowercase",
"asciifolding",
"max_token_length"
],
"type": "custom",
"tokenizer": "standard"
}
},
"tokenizer": {
"null_tokenizer": {
"type": "pattern",
"pattern": "a^"
}
}
}
}
},
"mappings": {
"_default_": {
"dynamic_templates": [
{
"non_analyzed_string": {
"match": "*",
"match_mapping_type": "string",
"mapping": {
"type": "string",
"index": "not_analyzed"
}
}
}
],
"properties": {
"created_at": {
"type": "date"
},
"updated_at": {
"type": "date"
},
"name": {
"type": "string",
"index": "analyzed",
"copy_to": "search_field",
"fields": {
"raw": {
"type": "string",
"index": "not_analyzed"
}
}
},
"verified_email": {
"type": "string",
"index": "analyzed",
"copy_to": "search_field",
"analyzer": "lowercaseonly",
"fields": {
"raw": {
"type": "string",
"index": "not_analyzed"
}
}
},
"tags": {
"type": "string",
"index": "analyzed",
"analyzer": "lowercaseonly"
},
"email": {
"type": "string",
"index": "analyzed",
"analyzer": "lowercaseonly",
"copy_to": "search_field",
"fields": {
"raw": {
"type": "string",
"index": "not_analyzed"
}
}
},
"comments": {
"properties": {
"text": {
"type": "string",
"copy_to": "search_field",
"index": "analyzed"
}
}
},
"properties": {
"properties": {
"value": {
"type": "string",
"copy_to": "property_values",
"index": "analyzed"
}
}
},
"search_field": {
"type": "string",
"store": false,
"fields": {
"{name}": {
"type": "string",
"index": "analyzed"
},
"ngrams": {
"type": "string",
"analyzer": "ngrams_analyzer"
},
"asciingrams": {
"type": "string",
"analyzer": "ascii_ngrams_analyzer"
}
}
},
"property_values": {
"type": "string",
"store": false,
"fields": {
"{name}": {
"type": "string",
"index": "analyzed"
},
"ngrams": {
"type": "string",
"analyzer": "ngrams_analyzer"
},
"asciingrams": {
"type": "string",
"analyzer": "ascii_ngrams_analyzer"
}
}
}
}
},
"user": {
"properties": {
"connected_accounts.meta": {
"type": "object",
"enabled": "false"
},
"connected_accounts.credentials": {
"type": "object",
"enabled": "false"
},
"usercontacts": {
"type": "object",
"enabled": "false"
},
"linked_contacts": {
"type": "object",
"enabled": "false"
}
}
},
"token": {},
"contact": {
"_parent": {
"type": "user"
}
},
"usercontact": {
"_parent": {
"type": "user"
}
},
"group": {
"properties": {
"name": {
"type": "string",
"index": "analyzed",
"analyzer": "lowercaseonly",
"fields": {
"raw": {
"type": "string",
"index": "not_analyzed"
}
}
}
}
},
"groupcontact": {
"_parent": {
"type": "group"
}
},
"customer_account": {}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment