Hello Everyone ! we are working on a project and we are stuck at following point and need some Advice on How to solve the problem.
I have exported the entire Data set in Elastic Search. We have a field called location and inside that Field we geo which is string
following is a small snippets for entire long data set which show the locations
"locations": [
{
"name": "orlando, florida, united states",
"locality": "orlando",
"region": "florida",
"subregion": "orange county",
"country": "united states",
"continent": "north america",
"type": "locality",
"geo": "28.53,-81.37",
"postal_code": "xx",
"zip_plus_4": "xx-xx",
"street_address": "xxxxxx",
"address_line_2": null,
"most_recent": false,
"is_primary": true,
"last_updated": null
}
Following is mapping of that particular field which is shown below
"locations": {
"properties": {
"address_line_2": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"continent": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"country": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"geo": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
This is a simple Query i did
GET /testdb/_search
{
"_source":["locations.geo"],
"size":2,
"query": {
"bool": {
"must": [],
"filter": [],
"should": [],
"must_not": []
}
}
}
Following is Result
{
"took" : 4,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 10000,
"relation" : "gte"
},
"max_score" : 1.0,
"hits" : [
{
"_index" : "testdb",
"_type" : "testtable",
"_id" : "8XTChFziMf9hjDjzoB1d2g_0000",
"_score" : 1.0,
"_source" : {
"locations" : [
{
"geo" : "28.53,-81.37"
},
{
"geo" : null
}
]
}
},
{
"_index" : "testdb",
"_type" : "testtable",
"_id" : "8MdkHpA9S5b5OzSqWYzQug_0000",
"_score" : 1.0,
"_source" : {
"locations" : [
{
"geo" : "25.77,-80.19"
},
{
"geo" : "30.33,-81.65"
},
{
"geo" : "28.53,-81.37"
}
]
}
}
]
}
}
any help would be really Great. i have read several post saying we need to create a ingestion. if some one can help me out that would be Great
my email : Shahsoumil519@gmail.com
Following is one record how it Looks like
{
"_index": "testdb",
"_type": "testtable",
"_id": "8XTChFziMf9hjDjzoB1d2g_0000",
"_version": 1,
"_score": 0,
"_source": {
"names": [
{
"first_name": "xx",
"last_name": "xx",
"suffix": null,
"middle_name": null,
"middle_initial": "d",
"name": "x d xx",
"clean": "x xx",
"is_primary": true
},
{
"first_name": "xx",
"last_name": "xx",
"suffix": null,
"middle_name": null,
"middle_initial": null,
"name": "maxxtthew xx",
"clean": "x xx",
"is_primary": false
},
{
"first_name": "xx",
"last_name": "xx",
"suffix": null,
"middle_name": null,
"middle_initial": null,
"name": "x xxxx",
"clean": "matthew xx",
"is_primary": false
},
{
"first_name": "xx",
"last_name": "xx",
"suffix": null,
"middle_name": null,
"middle_initial": "d",
"name": "maxxx",
"clean": "xx xx",
"is_primary": false
},
{
"first_name": "xx",
"last_name": "xx",
"suffix": null,
"middle_name": null,
"middle_initial": "d",
"name": "mr matxxd",
"clean": "maxld",
"is_primary": false
},
{
"first_name": "xx",
"last_name": "xx",
"suffix": null,
"middle_name": null,
"middle_initial": "d",
"name": "mxxxd xx",
"clean": "xx xx",
"is_primary": false
},
{
"first_name": "xxx",
"last_name": "xx",
"suffix": null,
"middle_name": null,
"middle_initial": "d",
"name": "mr. matthew d xxx dmd",
"clean": "matthew xx",
"is_primary": false
}
],
"skills": [],
"emails": [
{
"address": "mixxxxm",
"type": "personal",
"sha256": "0c97291a37d2b075d08dde2f4a7cbf511f40c7f66050ee7cefdec8e31b20dbaa",
"domain": "zz.com",
"local": "zz"
},
{
"address": "jxxxxxnet",
"type": "personal",
"sha256": "97c8825c00cb59c866788508684d4ab4a3d9cd7b467ba6c9ff5917fc39ff08cf",
"domain": "worldnet.att.net",
"local": "jimfield"
}
],
"summaries": [],
"phone_numbers": [
{
"E164": "+xxxx",
"extension": null,
"type": null,
"number": "xx",
"country_code": "1",
"national_number": "xxx",
"area_code": "407",
"is_primary": false
},
{
"E164": "+xx",
"extension": null,
"type": null,
"number": "xx",
"country_code": "1",
"national_number": "xx",
"area_code": "407",
"is_primary": false
},
{
"E164": "+xxx",
"extension": null,
"type": null,
"number": "1-407-xx-xxxxx",
"country_code": "1",
"national_number": "xx",
"area_code": "407",
"is_primary": false
}
],
"locations": [
{
"name": "orxxates",
"locality": "zzz",
"region": "florida",
"subregion": "orange county",
"country": "unixx,
"continent": "noxxa",
"type": "locality",
"geo": "28.53,-81.37",
"postal_code": "32819",
"zip_plus_4": "xxxxx-4418",
"street_address": "xxxx",
"address_line_2": null,
"most_recent": false,
"is_primary": true,
"last_updated": null
},
{
"name": "brexxxstates",
"locality": "xx",
"region": "xx",
"subregion": null,
"country": "xx states",
"continent": "xx america",
"type": "locality",
"geo": null,
"postal_code": "xx",
"zip_plus_4": null,
"street_address": "5xxxe",
"address_line_2": null,
"most_recent": false,
"is_primary": false,
"last_updated": null
}
],
"education": [],
"interests": [
{
"name": "xx"
},
{
"name": "home improvement"
},
{
"name": "reading"
},
{
"name": "gourmet cooking"
},
{
"name": "sports"
},
{
"name": "food"
},
{
"name": "home decoration"
},
{
"name": "health"
},
{
"name": "photograph"
},
{
"name": "cooking"
},
{
"name": "electronics"
},
{
"name": "outdoors"
},
{
"name": "fitness"
},
{
"name": "music"
},
{
"name": "movies"
},
{
"name": "collecting"
},
{
"name": "kids"
},
{
"name": "medicine"
},
{
"name": "automobiles"
},
{
"name": "travel"
},
{
"name": "boating"
},
{
"name": "investing"
},
{
"name": "traveling"
}
],
"gender": null,
"version_status": {
"status": "unchanged",
"contains": [],
"previous_version": "8.0",
"current_version": "8.1"
},
"birth_date": "xx-sss-aaa",
"profiles": [],
"primary": {
"job": null,
"location": {
"name": "orlxxtates",
"locality": "xx",
"region": "xx",
"country": "xx states",
"last_updated": null,
"continent": "nxxca"
},
"name": {
"first_name": "xxx",
"middle_name": null,
"last_name": "imfeld",
"clean": "xxxxx imfeld"
},
"industry": "mxxctice",
"work_emails": [],
"personal_emails": [
"mixxil.com",
"jixxxet.att.net"
],
"other_emails": [],
"linkedin": null
},
"industries": [
{
"name": "xx xx",
"is_primary": true
}
],
"certifications": []
},
"fields": {
"birth_date": [
"19aassssss31T00:00:00.000Z"
]
}
}