Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
es = Elasticsearch()
mapped_body = {
"settings": {
"analysis": {
"char_filter": {
"digits_only": {
"type": "pattern_replace",
"pattern": "[^\d]"
}
},
"filter": {
"us_phone_number": {
"type": "pattern_capture",
"preserve_original": True,
"patterns": [
"1?(1)(\d*)"
]
},
"ten_digits_min": {
"type": "length",
"min": 10
},
"not_empty": {
"type": "length",
"min": 1
}
},
"analyzer": {
"number": {
"char_filter": "digits_only",
"tokenizer": "keyword",
"filter": [
"us_phone_number",
"ten_digits_min"
]
},
"number_search" : {
"char_filter" : "digits_only",
"tokenizer" : "keyword",
"filter" : [
"not_empty"
]
},
"email_analyzer": {
"tokenizer": "email_tokenizer"
}
},
"tokenizer": {
"email_tokenizer": {
"type": "uax_url_email",
"max_token_length": 5
}
}
,
"normalizer": {
"custom_sort_norm": {
"type": "custom",
"char_filter": [],
"filter": [
"lowercase"
]
}
}
}
},
"mappings": {
"properties": {
"dataareaid":{
"type": "text",
"analyzer":"standard",
},
"salescurrencycode":{
"type": "text",
"analyzer":"standard",
},
"ismdm":{
"type": "text",
"analyzer":"standard",
},
"customerno":{
"type": "text",
"analyzer":"number",
"search_analyzer":"number_search",
},
"firstname":{
"type": "text",
"fields": {
"firstname_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"middlename":{
"type": "text",
"fields": {
"middlename_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"lastname":{
"type": "text",
"fields": {
"lastname_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"email":{
"type": "text",
"analyzer":"email_analyzer",
"fields": {
"email_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"phone":{
"type": "text",
"analyzer":"number_search"
},
"address":{
"type": "text",
"analyzer":"standard",
"fields": {
"address_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"zipcode":{
"type": "text",
"analyzer":"number",
"search_analyzer":"number_search",
},
"city":{
"type": "text",
"fields": {
"city_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"state":{
"type": "text",
"fields": {
"state_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"country":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
},
"cellphone":{
"type": "text",
"analyzer":"number_search",
},
"householdnum":{
"type": "text",
"analyzer":"number_search",
},
"birthdaymonth":{
"type": "text",
"analyzer":"number_search",
},
"income":{
"type": "text",
"analyzer":"number_search",
},
"race":{
"type": "text",
"fields": {
"race_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"ethnicity":{
"type": "text",
"fields": {
"ethnicity_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"maritalstatus":{
"type": "text",
"fields": {
"maritalstatus_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"gender":{
"type": "text",
"fields": {
"gender_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"numofchildren":{
"type": "text",
"analyzer":"number_search",
},
"countryoforigin":{
"type": "text",
"fields": {
"countryoforigin_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"education":{
"type": "text",
"fields": {
"education_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"languagepreference":{
"type": "text",
"analyzer":"standard",
"fields": {
"languagepreference_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"phonetype":{
"type": "text",
"fields": {
"phonetype_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"faxno":{
"type": "text",
"analyzer":"number_search",
},
"oktoemailind":{
"type": "text",
"analyzer":"standard",
"fields": {
"oktoemailind_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"oktomailind":{
"type": "text",
"analyzer":"standard",
"fields": {
"oktomailind_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"oktomailind":{
"type": "text",
"analyzer":"standard",
"fields": {
"oktomailind_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"donotpromoteind":{
"type": "text",
"analyzer":"standard",
"fields": {
"donotpromoteind_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"addressreliableind":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
},
"smsind":{
"type": "text",
"analyzer":"standard",
"fields": {
"smsind_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"activeind":{
"type": "text",
"analyzer":"standard",
"fields": {
"activeind_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"organizationname":{
"type": "text",
"analyzer":"standard",
"fields": {
"organizationname_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"customertype":{
"type": "text",
"analyzer":"standard",
"fields": {
"customertype_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"sourcesystem":{
"type": "text",
"analyzer":"standard",
"fields": {
"sourcesystem_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"regularind":{
"type": "text",
"analyzer":"standard",
"fields": {
"regularind_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"mailorderbuyerind":{
"type": "text",
"analyzer":"standard",
"fields": {
"mailorderbuyerind_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"mailorderresponderind":{
"type": "text",
"analyzer":"standard",
"fields": {
"mailorderresponderind_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"ecomcustomerind":{
"type": "text",
"analyzer":"standard",
"fields": {
"ecomcustomerind_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"goldpremiumind":{
"type": "text",
"analyzer":"standard",
"fields": {
"goldpremiumind_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"guestcustomerind":{
"type": "text",
"analyzer":"standard",
"fields": {
"guestcustomerind_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"promotableind":{
"type": "text",
"analyzer":"standard",
"fields": {
"promotableind_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"loyaltycardname":{
"type": "text",
"analyzer":"standard",
"fields": {
"loyaltycardname_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"loyaltycardtype":{
"type": "text",
"analyzer":"keyword",
"fields": {
"loyaltycardtype_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"loyaltycardsignupdate":{
"type": "text",
"analyzer":"whitespace",
"fields": {
"loyaltycardsignupdate_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"customerbillingname":{
"type": "text",
"analyzer":"standard",
"fields": {
"customerbillingname_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"custbilladdressline1":{
"type": "text",
"analyzer":"keyword",
"fields": {
"custbilladdressline1_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"custbilladdressline2":{
"type": "text",
"analyzer":"keyword",
"fields": {
"custbilladdressline2_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"custbillzipcode":{
"type": "text",
"analyzer":"number",
"search_analyzer":"number_search",
},
"custbillcity":{
"type": "text",
"analyzer":'standard',
"fields": {
"custbillcity_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"custbillstate":{
"type": "text",
"analyzer":'standard',
"fields": {
"custbillstate_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"custbillcountry":{
"type": "text",
"analyzer":'standard',
"fields": {
"custbillcountry_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"custbillphonetype":{
"type": "text",
"analyzer":'standard',
"fields": {
"custbillphonetype_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"custbillphonenumber":{
"type": "text",
"analyzer":"number_search",
},
"custbillcellnumber":{
"type": "text",
"analyzer":"number_search",
},
"custbillemailind":{
"type": "text",
"analyzer":"standard",
"fields": {
"custbillemailind_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"custbillemailaddress":{
"type": "text",
"analyzer":"standard",
"fields": {
"custbillemailaddress_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"custbillfaxno":{
"type": "text",
"analyzer":"number_search",
},
"custbilllongitude":{
"type": "text",
"analyzer":"standard",
"fields": {
"custbilllongitude_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"custbilllatitude":{
"type": "text",
"analyzer":"standard",
"fields": {
"custbilllatitude_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"homeassessedvalue":{
"type": "text",
"analyzer":"number_search",
},
"homemarketvalue":{
"type": "text",
"analyzer":"number_search",
},
"homeownervalue":{
"type": "text",
"analyzer":"number_search",
},
"homevaluepremier":{
"type": "text",
"analyzer":"number_search",
},
"srccreateddate":{
"type": "text",
"analyzer":"whitespace",
"fields": {
"srccreateddate_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"srcmodifieddate":{
"type": "text",
"analyzer":"whitespace",
"fields": {
"srcmodifieddate_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"loaddate":{
"type": "text",
"analyzer":"whitespace",
"fields": {
"loaddate_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"effectivedate":{
"type": "text",
"analyzer":"whitespace",
"fields": {
"effectivedate_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
},
"terminationdate":{
"type": "text",
"analyzer":"whitespace",
"fields": {
"terminationdate_key":{
"type":"keyword",
"normalizer":"custom_sort_norm",
"ignore_above":100
}
}
}
}
}
}
#index_creation using mapping
es.indices.create(index="customermaster_50", body = mapped_body)
print("Index has been created successfully")
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team