Skip to content

Instantly share code, notes, and snippets.

@jaydanielian
Created June 5, 2015 16:48
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jaydanielian/80f21ccfdb57f3d6d527 to your computer and use it in GitHub Desktop.
primary entity mapping
indexed_entity:{
_id: {path: 'entity_id'},
_routing:{
required:true,
path: 'entity_key'
},
:_all => {:enabled => false},
properties: {
cards_meta: {
type: 'object',
enabled: false,
store: false
},
entity_key: {type:'string', index: 'not_analyzed'},
entity_id: {type: 'long'},
entity_rank: {type: 'float', null_value: 0.0},
location: {type:'string', index: 'not_analyzed', store: false},
card_count: {type: 'integer', null_value: 0},
contact_count: {type: 'integer', null_value: 0},
user_count: {type: 'integer', null_value: 0},
top_item_hash: {type: 'long', null_value: 0},
top_card_hash: {type: 'long', null_value: 0},
conf_v2: {type: 'float', null_value: 0.0},
terms: {
#dynamic: true,
properties: {
names: {
type: 'nested',
properties: {
first_name: {type: 'string'},
last_name: {type: 'string'} ,
org_id: {type: 'string', index: 'not_analyzed'},
fn_h: {type: 'string', index: 'not_analyzed'},
ln_h: {type: 'string', index: 'not_analyzed'}
}
},
emails: {
type: 'nested',
properties: {
ev: {type: 'string', index: 'not_analyzed'},
eh: {type: 'string', index: 'not_analyzed'},
org_id: {type: 'string', index: 'not_analyzed'},
item_type: {type: 'integer'},
prob: {type: 'float', enabled: false, store: false},
conf: {type: 'float', enabled: false, store: false}
}
},
titles: {
type: 'object',
enabled: false,
store: false
},
organizations: {
type: 'nested',
properties: {
ov: {type: 'string'},
org_id: {type: 'string', index: 'not_analyzed'},
prob: {type: 'float', enabled: false, store: false},
conf: {type: 'float', enabled: false, store: false}
}
},
addresses: {
type: 'object',
enabled: false,
store: false
},
phone_numbers: {
type: 'nested',
properties: {
digits: {type:'string', index: 'not_analyzed'},
dh: {type: 'string', index: 'not_analyzed'},
ext: {type:'string', index: 'no', store:false },
country_code: {type: 'string',index: 'no', store: false},
mobile: {type: 'boolean'},
prob: {type: 'float', enabled: false, store: false},
item_type: {type: 'integer'},
org_id: {type: 'string', index: 'not_analyzed'},
conf: {type: 'float', enabled: false, store: false}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment