"Unable to Tessellate shape....Possible malformed shape detected." Error while indexing in ES 7.17.7

Greetings to the community!

We have a logstash pipeline writing a geojson file to Elasticsearch. The file never gets fully indexed and some geo_shape records get dropped by Elasticsearch. Identified the records that caused the issue and tried to index them individually. The cluster runs ES 7.17.7 with Lucene 8.11.1.
The mapping applied was

{"mappings":{"properties":{"geometry":{"type":"geo_shape"}}}}

A sample record is provided below.

{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[116.03085801377446,-34.57679623838386],[116.03469600372901,-34.57679623838386],[116.03577029370054,-34.57375261146071],[116.03797153984577,-34.57506310035999],[116.03790071758799,-34.57679623838386],[116.05543682198346,-34.57679623838386],[116.05340978689263,-34.574631647897846],[116.05722722260825,-34.57445734494164],[116.05632925326489,-34.57679623838386],[116.07530647041163,-34.57679623838386],[116.07526725931423,-34.5767113924698],[116.07854031866268,-34.576590164851496],[116.07853958161705,-34.57679623838386],[116.21041713552002,-34.57679623838386],[116.21041713552002,-34.42882193020025],[116.03085801377446,-34.42882193020025],[116.03085801377446,-34.50689009103903],[116.0335910374151,-34.506326122302674],[116.03306610687882,-34.502804422602956],[116.03609406000362,-34.50156683868896],[116.03548737199675,-34.49749595732468],[116.04089308932181,-34.49788032259191],[116.04134545305106,-34.50097029153891],[116.04180646486165,-34.502283234054154],[116.04411255967186,-34.503091857003255],[116.04410812828263,-34.506615462589025],[116.0385528019369,-34.5070199653754],[116.03854384483519,-34.513302019971995],[116.03611789859633,-34.51386304391773],[116.03433756885725,-34.51639411517687],[116.033660637985,-34.515518353094954],[116.03255983704594,-34.50884957069952],[116.03085801377446,-34.508847927431205],[116.03085801377446,-34.55396273299575],[116.03274121588497,-34.55328272185509],[116.03264746410862,-34.54975211479077],[116.0362501225213,-34.5489535477822],[116.03444408838868,-34.547150021575604],[116.03225276772899,-34.547189142626344],[116.03350859273327,-34.54525774547972],[116.0348524427539,-34.54460803134535],[116.03659350084375,-34.54207269481045],[116.03826192385462,-34.54393799501316],[116.03809930094039,-34.55127762127851],[116.04029103662174,-34.55229189699755],[116.04169358076645,-34.55424642706688],[116.04357198856823,-34.55356864517526],[116.04338377624485,-34.54648625796617],[116.04882859992921,-34.547757903342465],[116.0489811796785,-34.5534773706797],[116.04621256388803,-34.55481644905849],[116.04633031864876,-34.5592491947406],[116.04148647956758,-34.557961663711374],[116.04008388960884,-34.55600711512997],[116.03621367427695,-34.5563964262093],[116.03497800567108,-34.55819564680516],[116.03085801377446,-34.558094659764095],[116.03085801377446,-34.57679623838386]],[[116.05344386538125,-34.56688608613972],[116.05546842818148,-34.5647914583692],[116.05691591683646,-34.56581014905757],[116.05781854762719,-34.566843428819986],[116.05890987403497,-34.56791027171185],[116.06039424661716,-34.57163356793954],[116.06322929012794,-34.574403524802555],[116.05722722260825,-34.57445734494164],[116.05650741514754,-34.56848305759399],[116.05344386538125,-34.56688608613972]],[[116.07052592878682,-34.57401601995632],[116.07120619510366,-34.56956106307906],[116.07337719766824,-34.5697843862019],[116.07269702208117,-34.57423935552225],[116.07052592878682,-34.57401601995632]],[[116.07365196446587,-34.56076292874359],[116.07474295131044,-34.558662238682274],[116.07634345360105,-34.56042113695252],[116.07365196446587,-34.56076292874359]],[[116.06706936788035,-34.56482440383758],[116.06856633214788,-34.56129315325262],[116.07365196446587,-34.56076292874359],[116.07285635536485,-34.5630265738691],[116.07146058361906,-34.563621811070455],[116.06983449281762,-34.56616943937648],[116.06706936788035,-34.56482440383758]],[[116.05911763369888,-34.54418691164896],[116.06257657963242,-34.54223651617352],[116.06280489454673,-34.54516748592216],[116.05911763369888,-34.54418691164896]],[[116.048867528422,-34.512660834654184],[116.05508625701187,-34.51390958854795],[116.05481587039954,-34.51810218555241],[116.05197124276295,-34.51750512095069],[116.051423120421,-34.51624683338284],[116.05004244037201,-34.51548244512024],[116.048867528422,-34.512660834654184]],[[116.1197064232446,-34.47233401244779],[116.12313619728752,-34.47046653576276],[116.12330278356876,-34.473568927254874],[116.1197064232446,-34.47233401244779]],[[116.1423197210782,-34.478194284419956],[116.15052564794229,-34.47804190477721],[116.15057313468489,-34.47976257063308],[116.14780776001591,-34.481103234215006],[116.14794688479891,-34.486176605700976],[116.14595366421892,-34.48714222856775],[116.14540483939446,-34.48759668972985],[116.14255863880783,-34.486893335444066],[116.1423197210782,-34.478194284419956]],[[116.18841184442009,-34.523663016870955],[116.18881681034007,-34.52099003403732],[116.19098705831978,-34.52121169270104],[116.19058214450214,-34.52388468174373],[116.18841184442009,-34.523663016870955]],[[116.20344070224252,-34.55224424553061],[116.20526632593663,-34.55032394106106],[116.20776319865864,-34.551787423087646],[116.20539846541992,-34.552935264595675],[116.20484955525546,-34.553390004715446],[116.20344070224252,-34.55224424553061]],[[116.1795891756044,-34.57140562227997],[116.17974264558416,-34.56852283287839],[116.18511213744706,-34.56871431335088],[116.18492114124466,-34.57578721787519],[116.18311948370409,-34.57513308824256],[116.18150435863735,-34.57314241731963],[116.1795891756044,-34.57140562227997]],[[116.07000318025831,-34.53799730866836],[116.07227566280561,-34.53309859122435],[116.0746332984553,-34.53601169783967],[116.07646875690503,-34.53767806336484],[116.07315027604099,-34.538506705663444],[116.07257491138965,-34.538933548979074],[116.07000318025831,-34.53799730866836]],[[116.06228241820783,-34.523704946592694],[116.06466486442731,-34.522301282304895],[116.06660932355537,-34.51978679148292],[116.06916146871859,-34.52144746514359],[116.06791988380813,-34.52263635638988],[116.06666283979003,-34.52337650825944],[116.06593428902666,-34.52467652559776],[116.06228241820783,-34.523704946592694]],[[116.0902192456029,-34.4955048640159],[116.0904908206863,-34.493723156444645],[116.09374503697332,-34.49405766874335],[116.09347351578877,-34.495839383233786],[116.0902192456029,-34.4955048640159]],[[116.08764230963274,-34.4979543776861],[116.08804974502148,-34.49528181319324],[116.0902192456029,-34.4955048640159],[116.09055693758953,-34.497877612192546],[116.08764230963274,-34.4979543776861]],[[116.07912987220381,-34.49572165299097],[116.08399584218034,-34.49540041028524],[116.08547276233895,-34.497731290476295],[116.08069272160925,-34.49819044026051],[116.07912987220381,-34.49572165299097]],[[116.08506525328836,-34.50040386306955],[116.08547276233895,-34.497731290476295],[116.08764230963274,-34.4979543776861],[116.08723485358281,-34.500626957934294],[116.08506525328836,-34.50040386306955]],[[116.07907624008642,-34.49285322213266],[116.08102716618616,-34.490526799075774],[116.08276188306834,-34.493833208808304],[116.07907624008642,-34.49285322213266]],[[116.10405110729239,-34.484259116849906],[116.10432241916946,-34.4824774326242],[116.10757632913091,-34.482811646448795],[116.10730507205112,-34.48459333908594],[116.10405110729239,-34.484259116849906]],[[116.12549403954968,-34.49939931320531],[116.12763329744878,-34.49808482459572],[116.12805154136697,-34.500294263572094],[116.12549403954968,-34.49939931320531]],[[116.1281358320867,-34.50442043351499],[116.13033696594256,-34.50208373571752],[116.13171370867565,-34.505193754780784],[116.1281358320867,-34.50442043351499]],[[116.12291783211332,-34.501849432776524],[116.12505717175908,-34.500534973915606],[116.12547537076148,-34.5027444308703],[116.12291783211332,-34.501849432776524]],[[116.11733879293901,-34.49829045067498],[116.1177454728445,-34.49561780737084],[116.12099983376031,-34.49595174939429],[116.12059323560145,-34.49862440494432],[116.11733879293901,-34.49829045067498]],[[116.10878054053225,-34.48601720785102],[116.11239500280777,-34.48380301513516],[116.11251522883383,-34.482857573828646],[116.1148391569991,-34.482209054580096],[116.11682456942258,-34.4796985665552],[116.11808407482454,-34.482266453848865],[116.11782254380437,-34.48432481457312],[116.1154985877913,-34.48497338031206],[116.11462659853487,-34.487154640551026],[116.10878054053225,-34.48601720785102]],[[116.1012416433093,-34.4922549778439],[116.1036283978489,-34.49105107678755],[116.10487957676655,-34.4892710503214],[116.10674396366339,-34.488656710133256],[116.10703339905129,-34.493613304579156],[116.10202354591578,-34.493612980291914],[116.1012416433093,-34.4922549778439]],[[116.10676210514056,-34.49539503967014],[116.10703339905129,-34.493613304579156],[116.10937476890616,-34.49425842049341],[116.11001642383555,-34.49572921357908],[116.10676210514056,-34.49539503967014]],[[116.11462706565881,-34.51610846608173],[116.12042982396648,-34.51713863401767],[116.11927760166392,-34.51813732558812],[116.11472008261319,-34.51849851227727],[116.11462706565881,-34.51610846608173]],[[116.17421830931907,-34.534162399112475],[116.1754848170887,-34.5325776632042],[116.1864703344611,-34.53237127512429],[116.18448241394137,-34.539153992200795],[116.18313956105065,-34.53980498836192],[116.18123515869952,-34.541930798663095],[116.18042131918808,-34.54126798571197],[116.17920842467122,-34.53759366667766],[116.1781009258934,-34.5366922993054],[116.17730807192534,-34.53558981018298],[116.17421830931907,-34.534162399112475]],[[116.18221185199216,-34.55406567580579],[116.18435151413313,-34.552750247433586],[116.1847711702029,-34.55495980512839],[116.18221185199216,-34.55406567580579]],[[116.1767675565172,-34.55685666054884],[116.17703782006033,-34.55507455668755],[116.18029421476189,-34.55540730527691],[116.18002400511766,-34.557189415326896],[116.1767675565172,-34.55685666054884]],[[116.1630622629596,-34.55274083276047],[116.16346798795603,-34.55006773942347],[116.16672418412992,-34.55040076773406],[116.16645375709341,-34.55218283483427],[116.17188088666157,-34.55273774237993],[116.17147536648112,-34.5554108720106],[116.16604809947067,-34.55485594678144],[116.1663185399819,-34.55307387034831],[116.1630622629596,-34.55274083276047]],[[116.16603882795859,-34.54178054745443],[116.16873891846261,-34.541155369874595],[116.17051642569506,-34.538622620964155],[116.17538757176425,-34.54011733566042],[116.17430062464354,-34.54081916416486],[116.17173939481785,-34.54141267928765],[116.17174165677568,-34.54638953808144],[116.169028563158,-34.545709202361564],[116.16834814772076,-34.54373096767338],[116.16603882795859,-34.54178054745443]],[[116.15787440595561,-34.54711846087117],[116.16048258802624,-34.54557914077829],[116.16111488969682,-34.53944244150223],[116.1632998601658,-34.53875759431105],[116.16391623919796,-34.54334485676831],[116.16599830495616,-34.54442731390157],[116.16696335338777,-34.54505442696636],[116.16351079986588,-34.54598435706442],[116.16346798795603,-34.55006773942347],[116.15868183239424,-34.55091773392404],[116.15787440595561,-34.54711846087117]],[[116.14645606141465,-34.54280030130997],[116.14828256186442,-34.54088070460096],[116.15077841589694,-34.5423450697087],[116.14841327212814,-34.543492021828555],[116.14786416343601,-34.543946550138195],[116.14645606141465,-34.54280030130997]],[[116.1160951598698,-34.553662867866116],[116.11955335660834,-34.551711164432014],[116.11978328579521,-34.55464211196549],[116.1160951598698,-34.553662867866116]],[[116.09282987648095,-34.522524330394745],[116.09628138077065,-34.52394645155021],[116.09481744755612,-34.52725292701916],[116.09306073272919,-34.527466529515024],[116.09282987648095,-34.522524330394745]],[[116.1083599951303,-34.547269972120766],[116.11007050151731,-34.54244209249272],[116.111260408146,-34.54330474683004],[116.1120655878981,-34.54699106219811],[116.11024152906928,-34.54767341402911],[116.10974363422983,-34.548182574232584],[116.1083599951303,-34.547269972120766]],[[116.1135064963936,-34.54894519442198],[116.11546481023827,-34.54472591893619],[116.11806370732211,-34.547696627696624],[116.11906005036329,-34.54866838327042],[116.11937598515378,-34.550075812256416],[116.1135064963936,-34.54894519442198]],[[116.12284211401634,-34.52460358886514],[116.12528221321247,-34.52234433104358],[116.1253424371674,-34.52535132926102],[116.12284211401634,-34.52460358886514]],[[116.09808042960367,-34.54234031701675],[116.09852022590215,-34.53678467334876],[116.10007210238639,-34.53590309756486],[116.10164622475035,-34.53239574668284],[116.10292114254763,-34.531671286932806],[116.10449510590973,-34.528163942067984],[116.10576995453684,-34.527439465483],[116.10756860900938,-34.52505623978752],[116.112309751789,-34.525307884642665],[116.11188106765049,-34.53073193517954],[116.11218572409257,-34.53214524884512],[116.11900026298957,-34.53199618772116],[116.12022222240594,-34.53344702821753],[116.12232589354507,-34.53451818891779],[116.12341294666699,-34.53734428336869],[116.12544223101233,-34.53578860225139],[116.12558349288742,-34.53399689532766],[116.12775187596462,-34.535074612874034],[116.12863268757545,-34.53611926714686],[116.13153537512542,-34.53759562839414],[116.12931878126356,-34.53885471821404],[116.12743064111395,-34.54371394691035],[116.11766763831673,-34.54319516232834],[116.11687798504602,-34.541141779777604],[116.11253407548843,-34.54090989831364],[116.11143350092486,-34.5380504789772],[116.10821086401334,-34.54035835643991],[116.10486525492597,-34.54122552984331],[116.10268871694264,-34.54607620285529],[116.09808042960367,-34.54234031701675]],[[116.09459438059973,-34.52122464435269],[116.09773890540399,-34.5203530349295],[116.09821568264782,-34.522566966028535],[116.09459438059973,-34.52122464435269]],[[116.08722953465802,-34.52234280638258],[116.08750123011575,-34.52056099895209],[116.0907562683612,-34.520895593025706],[116.09048462680242,-34.522677409581846],[116.08722953465802,-34.52234280638258]],[[116.08456185986107,-34.5079142032287],[116.08639376637223,-34.50659509045527],[116.08760694026505,-34.508430541239996],[116.09070431519507,-34.50979694840016],[116.08954832356162,-34.511344660941205],[116.0881708118706,-34.51195944760015],[116.08736714757639,-34.51421318168367],[116.08503741988761,-34.513443457125796],[116.08456185986107,-34.5079142032287]],[[116.0728943675761,-34.51899326243828],[116.07603900646642,-34.51812209671145],[116.07651531478959,-34.52033608340147],[116.0728943675761,-34.51899326243828]],[[116.08994025313014,-34.527469253753715],[116.09306073272919,-34.527466529515024],[116.09278911362838,-34.529248374977875],[116.09094699057745,-34.52977837402804],[116.08994025313014,-34.527469253753715]],[[116.08936469803601,-34.534035920437404],[116.09063361239231,-34.53214446884342],[116.09195945927631,-34.53147481099688],[116.09278911362838,-34.529248374977875],[116.0955012864729,-34.529930015268434],[116.09631602340131,-34.531017575571234],[116.09821480050216,-34.532622982979866],[116.09821327875609,-34.534042010824564],[116.08936469803601,-34.534035920437404]],[[116.08668068108742,-34.54762353059258],[116.08708833297004,-34.54495067020393],[116.09034412669871,-34.54528529132906],[116.08993655566444,-34.54795816390757],[116.08668068108742,-34.54762353059258]],[[116.08681476452504,-34.55397182719308],[116.08708654981425,-34.55218989237226],[116.09034256812173,-34.55252451916163],[116.09007083762974,-34.55430646235239],[116.08681476452504,-34.55397182719308]],[[116.09495065154307,-34.55536635330381],[116.09675600475273,-34.55376315497946],[116.09876658527553,-34.55667915093792],[116.1033742940995,-34.55650542514297],[116.10416561554169,-34.55900983108053],[116.10637305916406,-34.55892537464699],[116.10513166020492,-34.56089766570091],[116.09847657316924,-34.56132605128129],[116.09753155447346,-34.563217397511536],[116.09534985566883,-34.56248250526231],[116.09495065154307,-34.55536635330381]],[[116.15960443542866,-34.565094339292315],[116.16303653341326,-34.56322559260898],[116.16320444740448,-34.56632858773139],[116.15960443542866,-34.565094339292315]],[[116.16539714607981,-34.563046384033704],[116.16731178203874,-34.56090043249277],[116.17157831970086,-34.56229276961726],[116.17134825217344,-34.570780852957256],[116.16883794784118,-34.56987030140069],[116.16847285095017,-34.564571522473706],[116.16539714607981,-34.563046384033704]],[[116.17330604140201,-34.56898206808309],[116.17750941222825,-34.56827344831387],[116.17569074239292,-34.571224676043094],[116.17330604140201,-34.56898206808309]],[[116.1847711702029,-34.55495980512839],[116.18842150400432,-34.555861036815465],[116.18644514210737,-34.55728511058991],[116.1847711702029,-34.55495980512839]],[[116.19006884625045,-34.56364454906139],[116.19033890048611,-34.56186239532136],[116.19359554851258,-34.562194868935514],[116.19332554817582,-34.563977031086395],[116.19006884625045,-34.56364454906139]],[[116.18731623664173,-34.5502696036655],[116.18865603975198,-34.547813860540074],[116.1914633962874,-34.54887105442863],[116.18978817033491,-34.55094795327859],[116.18731623664173,-34.5502696036655]],[[116.17742539100311,-34.52344522592027],[116.17783063719746,-34.520772273104676],[116.1800008555328,-34.520994084076236],[116.17959566413572,-34.523667043836326],[116.17742539100311,-34.52344522592027]],[[116.09487037629265,-34.51218325915505],[116.09838202099402,-34.511273416533776],[116.09852636409049,-34.50945383029074],[116.10088910486593,-34.50884120887401],[116.10219139163502,-34.50711583897697],[116.10916694905511,-34.50694150858502],[116.11001642383555,-34.49572921357908],[116.11161869041729,-34.496346115868235],[116.11291985069902,-34.501917342008696],[116.11483027984745,-34.50385413361064],[116.1154964713605,-34.50670586683358],[116.11755453143928,-34.50780421682888],[116.11924768776493,-34.50966741550796],[116.1215635984663,-34.50466524570054],[116.12569097631116,-34.50501971129881],[116.12650462178648,-34.50698522409441],[116.13617854853838,-34.50781271644601],[116.13719484585704,-34.508931243542364],[116.13925317812543,-34.51002931178907],[116.14106757647168,-34.51202483259301],[116.14564607118419,-34.511324000535694],[116.14481332932262,-34.50969418403687],[116.14155027001993,-34.50941467078248],[116.14316366133819,-34.50590601638373],[116.14670761664364,-34.504477158642615],[116.14920337096324,-34.4974945862013],[116.15623011887972,-34.499244316730454],[116.15557143638421,-34.5044446949011],[116.15300633212472,-34.50601814467378],[116.15498381961076,-34.508021326921536],[116.15590969161453,-34.50903856283305],[116.15896782903121,-34.51066811086659],[116.15769510941138,-34.5119356739854],[116.15645631646487,-34.51269599474999],[116.15410054571774,-34.51426442933939],[116.15306340389131,-34.51327112594653],[116.15149757746906,-34.51155038977188],[116.14969428679129,-34.51383095245302],[116.14368290194541,-34.51440104099429],[116.14169317760859,-34.51572582882123],[116.13593960565598,-34.517331132046856],[116.13712888436233,-34.51808038104773],[116.14454481569757,-34.518714724079885],[116.14506461415867,-34.52240490816887],[116.14712329227845,-34.52350290616964],[116.14797645733805,-34.52556250911248],[116.15458114708969,-34.5251889874391],[116.1559182660339,-34.52349854836432],[116.15824282571484,-34.52284932163874],[116.15858233050179,-34.52016964619876],[116.16168666018862,-34.521795034604345],[116.16014205287168,-34.52485329897488],[116.1577118540083,-34.52634355018755],[116.15862998882257,-34.5274130171901],[116.16068890858911,-34.5285108470396],[116.16245552644367,-34.530453523401846],[116.16501533872788,-34.52263746657596],[116.16610237029026,-34.52391677821718],[116.166845219538,-34.53275991308352],[116.1689865687151,-34.53208115547327],[116.16932424543037,-34.529411841184604],[116.1724059663182,-34.53103999537062],[116.1705767745159,-34.53465956784841],[116.14988326897088,-34.5344738455186],[116.15008881608425,-34.53285486754578],[116.1535418385268,-34.53189176492517],[116.15268687593829,-34.530406350827796],[116.15062800378239,-34.5293084097948],[116.14881312483747,-34.527312924050214],[116.14748587029345,-34.52808007081136],[116.14703480822294,-34.531637310775714],[116.14436056943622,-34.53238314014572],[116.1452044261529,-34.535991748036956],[116.14826318161043,-34.53762160577857],[116.14618269958207,-34.53969366845694],[116.14259147762132,-34.53842984137092],[116.14100713332775,-34.53460218541305],[116.13666579295189,-34.53423160590778],[116.1358676488051,-34.53230299997088],[116.13280924009719,-34.53067291896135],[116.13394702557486,-34.53029646738512],[116.13953789106988,-34.529766613724085],[116.13905366589402,-34.52467854904739],[116.13679454848162,-34.526064090567566],[116.13444003717247,-34.52763069785467],[116.12791684887158,-34.52707332051062],[116.12838415158406,-34.52339229940481],[116.13070888014826,-34.52274348409966],[116.13204635213037,-34.52105325962174],[116.13414279632308,-34.51976777038155],[116.13036552608035,-34.51775469468491],[116.13163864724717,-34.5164873377763],[116.1339810573511,-34.51505213518812],[116.1266174807289,-34.51327569968721],[116.12480333660588,-34.511280006016634],[116.12350074171464,-34.512033543482076],[116.12216324727464,-34.51372365931962],[116.11578272671228,-34.51408339214504],[116.11462706565881,-34.51610846608173],[116.10778096265776,-34.51644661535449],[116.10620718794182,-34.51733301430222],[116.11147430420169,-34.51892706355995],[116.11225175385927,-34.52253258722963],[116.11056454527912,-34.52335792020646],[116.1088972882815,-34.521377059806525],[116.10462396744067,-34.52008291732676],[116.10374353042734,-34.51903816475691],[116.10164035875152,-34.51796679013689],[116.10075997024718,-34.51692202583202],[116.0986568704366,-34.51585061585619],[116.09791227845722,-34.513914941685826],[116.09580926937649,-34.512843498962454],[116.09487037629265,-34.51218325915505]],[[116.15036184194688,-34.49391466166443],[116.15288366986762,-34.49342189121519],[116.15539017432617,-34.49111271248714],[116.15590918586302,-34.49551820169152],[116.15447321181337,-34.4961328089468],[116.15395034111403,-34.496614709028194],[116.15058578026911,-34.49581956743986],[116.15036184194688,-34.49391466166443]],[[116.15006402527742,-34.48303426042303],[116.15332573800542,-34.48326404381074],[116.1531332505996,-34.48748352744827],[116.15061189698939,-34.48668459361039],[116.15006402527742,-34.48303426042303]],[[116.13616676803177,-34.50245696862109],[116.13766512738303,-34.498261578137374],[116.13889630890408,-34.498995658135755],[116.13941290846442,-34.501678119978855],[116.14160940791172,-34.50289280552186],[116.1416132446163,-34.505303606933815],[116.13985337131284,-34.504819323769794],[116.13930426262068,-34.5035613813495],[116.13616676803177,-34.50245696862109]],[[116.11972727134565,-34.47943807634584],[116.12155315644947,-34.477519067812715],[116.12404713030811,-34.47898365367062],[116.12168312380643,-34.480130035715284],[116.12113422981162,-34.48058440401407],[116.11972727134565,-34.47943807634584]],[[116.11193087743641,-34.47481199722433],[116.11489438003284,-34.47572413651445],[116.11489760139145,-34.47813479260404],[116.11311103375104,-34.47764213404655],[116.11193087743641,-34.47481199722433]],[[116.09876455867631,-34.47557300091434],[116.09917162306074,-34.472900541224696],[116.1008842566584,-34.47264181752306],[116.10427125741907,-34.47030204745331],[116.10432241916946,-34.4824774326242],[116.1010685289709,-34.48214314859558],[116.10201823687244,-34.47590732681982],[116.09876455867631,-34.47557300091434]],[[116.09590076727976,-34.46972816989799],[116.09854279427707,-34.468847564327156],[116.09917162306074,-34.472900541224696],[116.09632723976594,-34.473555391301865],[116.09590076727976,-34.46972816989799]],[[116.06823511072625,-34.499039796841345],[116.07063389370751,-34.497570710907226],[116.072636179187,-34.493252643803245],[116.07417832781505,-34.49532704294432],[116.07408145439314,-34.500178787242305],[116.06823511072625,-34.499039796841345]],[[116.07402473207108,-34.50244035399174],[116.07665071336079,-34.50185873623575],[116.07870388660447,-34.500161331151205],[116.08506525328836,-34.50040386306955],[116.08438602362739,-34.50485818488276],[116.08221634068792,-34.504635047301356],[116.08180872024626,-34.50730765395319],[116.07421471497399,-34.50652641367563],[116.07402473207108,-34.50244035399174]],[[116.07138089946011,-34.50789781028317],[116.07421471497399,-34.50652641367563],[116.07311464885674,-34.50952188507672],[116.07138089946011,-34.50789781028317]],[[116.04834455711138,-34.520989587733716],[116.05148946010635,-34.52011891361657],[116.05196525908484,-34.52233298564107],[116.04834455711138,-34.520989587733716]],[[116.05462012480416,-34.52332406425728],[116.06007565371179,-34.522263521754404],[116.06092693500425,-34.52465584555489],[116.06316239169044,-34.52661452449315],[116.06053145259875,-34.52724499480868],[116.05969265519376,-34.52946330668995],[116.05807639106322,-34.52888681972297],[116.05747186799613,-34.525823513909664],[116.05462012480416,-34.52332406425728]],[[116.06565969290891,-34.530880065362645],[116.06566165662615,-34.52946104653627],[116.07450984927402,-34.52946848713363],[116.07324067799955,-34.53135979452128],[116.06757428664702,-34.5315826140994],[116.06701614988621,-34.53202710810414],[116.06565969290891,-34.530880065362645]],[[116.06217924130753,-34.55353395068361],[116.06332500202828,-34.551925058571456],[116.06510814169755,-34.55173919645637],[116.06555321919157,-34.55486927421613],[116.06217924130753,-34.55353395068361]],[[116.06510814169755,-34.55173919645637],[116.06661373967333,-34.54878516563063],[116.06888867102806,-34.55160332376715],[116.06510814169755,-34.55173919645637]],[[116.06433946858031,-34.54651672606062],[116.06731793082113,-34.54476243214236],[116.0701400466767,-34.54281526669343],[116.07684993902957,-34.543284640427814],[116.07550726220869,-34.545134895971344],[116.07425000259497,-34.54587514604961],[116.07306476630738,-34.54669349672564],[116.07180746986263,-34.54743372998085],[116.07121483599836,-34.547842898661585],[116.06433946858031,-34.54651672606062]],[[116.08061401930894,-34.555078858092344],[116.08375967688879,-34.554207464701186],[116.08423631219873,-34.556421608333736],[116.08061401930894,-34.555078858092344]],[[116.08095046982385,-34.56839265309728],[116.08437576756178,-34.56783980284744],[116.08387806945326,-34.565886800905965],[116.08765204377718,-34.56527782435897],[116.08652234403547,-34.56084373913344],[116.09039695392566,-34.56208677628161],[116.0887648785478,-34.56740890394149],[116.08730025093556,-34.56793357885549],[116.08618614055717,-34.569858791603735],[116.08472146623252,-34.57038344662135],[116.08396046832104,-34.57268255417558],[116.08188544176149,-34.57206271778923],[116.08095046982385,-34.56839265309728]],[[116.15777975586401,-34.57301292453352],[116.15818569376111,-34.570339723708706],[116.16361372074624,-34.57089494211402],[116.16293737108397,-34.57535031495272],[116.16076606309221,-34.57512823904915],[116.16103664553728,-34.573346089543385],[116.15777975586401,-34.57301292453352]],[[116.18679511496224,-34.57447279206878],[116.19025268108345,-34.57251942518614],[116.19048463237803,-34.57545040653612],[116.18679511496224,-34.57447279206878]],[[116.20153418525719,-34.55446732838287],[116.20417229020994,-34.55556355854983],[116.20432653004585,-34.56105429482763],[116.20350052914213,-34.56230079687769],[116.20173719283328,-34.5616967490976],[116.20153418525719,-34.55446732838287]],[[116.15597973954546,-34.488677954429626],[116.15598100347503,-34.48465800582366],[116.1584198387416,-34.48571346092554],[116.15923488558876,-34.48680058324448],[116.16140367470447,-34.48782834643266],[116.16221876736573,-34.488915456735185],[116.16655718552198,-34.49016516685697],[116.16737234915014,-34.49125225706496],[116.1726501661417,-34.49277105894673],[116.17078325587717,-34.49400437854496],[116.16097598410276,-34.49417078656643],[116.16167940808938,-34.49650111921189],[116.15896767092767,-34.49582068464653],[116.15841433476385,-34.490733141998426],[116.15597973954546,-34.488677954429626]],[[116.08521638944502,-34.44160938314916],[116.08562366762855,-34.43893716085873],[116.0888761681334,-34.439271734242205],[116.08846897169659,-34.44194396657573],[116.08521638944502,-34.44160938314916]],[[116.05239040835265,-34.490706315551876],[116.05348109336326,-34.48860610645225],[116.05508017002751,-34.49036494545291],[116.05239040835265,-34.490706315551876]],[[116.04981270522129,-34.49315517575432],[116.05022108563765,-34.490482739529895],[116.05239040835265,-34.490706315551876],[116.05198208273346,-34.493378758678816],[116.04981270522129,-34.49315517575432]],[[116.05724838332308,-34.50117608151396],[116.06013689366132,-34.49953843451343],[116.06109600153395,-34.50203366136092],[116.06164380497403,-34.50294544819985],[116.06407112833016,-34.499729762023996],[116.06894003310272,-34.501174770416576],[116.06652741606605,-34.50254346043536],[116.0649525678634,-34.50605021916003],[116.06417911031885,-34.507303128001894],[116.06041574420024,-34.506487893863536],[116.05967086655652,-34.50454843328952],[116.05851928295617,-34.50448637149377],[116.05724838332308,-34.50117608151396]],[[116.04316004273852,-34.5263265199488],[116.04497320140965,-34.522123181641824],[116.04662333472136,-34.52374076961075],[116.04680816039611,-34.52723101315717],[116.04316004273852,-34.5263265199488]],[[116.04329146536624,-34.53267454714528],[116.04526930589023,-34.53125237225472],[116.04693980580606,-34.53357905132832],[116.04329146536624,-34.53267454714528]],[[116.05141198041312,-34.5379530033816],[116.05274966799092,-34.535683552984636],[116.05549955211113,-34.5374815165043],[116.05322462614623,-34.53815034683412],[116.05276966089589,-34.5387044118741],[116.05141198041312,-34.5379530033816]],[[116.04036463289803,-34.56694193578652],[116.04244906481873,-34.564485965758216],[116.0461024304342,-34.565470498851845],[116.0461040734529,-34.567881643003155],[116.04036463289803,-34.56694193578652]],[[116.04875251172635,-34.55865211520623],[116.0515649733875,-34.55812878515365],[116.0527320322653,-34.55625522920557],[116.05495687535647,-34.55534609814999],[116.05433330171712,-34.55117418450039],[116.05988918861159,-34.55259472207597],[116.0600320602677,-34.5535550423083],[116.05664282988843,-34.55418702208478],[116.0573066498491,-34.55862821657736],[116.05449420256089,-34.55915164927919],[116.05262100768266,-34.561313079235745],[116.04902435001611,-34.56047241017547],[116.04875251172635,-34.55865211520623]],[[116.06755887155678,-34.57579295535152],[116.0697004147699,-34.57447903926376],[116.07011774150814,-34.576689015299664],[116.06755887155678,-34.57579295535152]]]}}

The operation fails with the following error.

{
  "error" : {
    "root_cause" : [
      {
        "type" : "mapper_parsing_exception",
        "reason" : "failed to parse field [geometry] of type [geo_shape]"
      }
    ],
    "type" : "mapper_parsing_exception",
    "reason" : "failed to parse field [geometry] of type [geo_shape]",
    "caused_by" : {
      "type" : "illegal_argument_exception",
      "reason" : "Unable to Tessellate shape [[-34.57679623838386, 116.03469600372901] [-34.57375261146071, 116.03577029370054] [-34.57506310035999, 116.03797153984577] ............[-34.57679623838386, 116.03790071758799] [-34.57679623838386, 116.05543682198346] [-34.574631647897846, 116.05340978689263] [-34.57445734494164, 116.05722722260825] ]. Possible malformed shape detected."
    }
  },
  "status" : 400
}

The shape has been validated in geojson.io and renders correctly.

A previous discussion in this forum https://discuss.elastic.co/t/err-reason-unable-to-tessellate-shape-possible-malformed-shape-detected/309989/3 pointed to a bug in Lucene tessellator. We tried the data on Elasticsearch versions 8.4 and 8.5, which produced the same error. Going with ES 6.3.2 (Lucene 7.3.1), the record was successfully inserted.

What could be the possible cause for these records getting successfully indexed in ES 6, but failing in versions 7 and 8?

Hi @amal_antony Welcome to the Community!

Perhaps take a look at this thread.

There is a limit of significant digits supported.

geo_shape field uses double precision and supports up to 15 significant digits. shape field uses single precision and supports up to 7 significant digits

[-34.57375261146071, 116.03577029370054]

Both of those have more than 15 significant digits,

Thanks for the response, Stephen. Is this limit specific to a version of Elasticsearch or is it generally applicable??
We have around 20k records, out of which only a dozen that fails to index. Will check the precision of those records and get back to you.
Thanks again.

The thread above was a discussion about the precision between shape and geo_shape fields and I don't think it has any connection here.

I just tried to index the geometry in a recent version of Elasticsearch (ES 8.4.x) and it worked so it seems that there might be a bug in Lucene tessellator that was fixed but not backported to 7.17.x. I need to have a deeper look to check that.

1 Like

The polygon you posted above works on those versions so I am a bit confused with this statement. did you try with this exact polygon?

@Ignacio_Vera Curious Which polygon did you test? I did not see it posted...

Thanks for the response, @Ignacio_Vera .
We tried the the ES versions mentioned above as the destination for the logstash pipeline. The sample provided in the original post was tested on ES 6.3 and ES 7.17.
Good to know that the record was successfully indexed in ES 8.x.
Let me try and collect all the records that failed during indexing and make it available as a file.

Here is another sample record that's readily available.
https://controlc.com/c7439bbc

I can confirm that the data given above has been tested on ES versions 6.3.2, 7.17.7 and 8.5.1. Only in 6.3.2, indexing was successful. The error screenshots are attached.
ES 8.5.1

ES 7.17.7

Can you confirm if this sample works in your ES instance? This could help us identify if the issue is with the input data or Elasticsearch.

Appreciate your help, Ignacio.

The first Big Polygon is failing for me it starts with

[150.32665024471314,-22.961582218679766],

Perhaps isolate down to that one to help debug...

Also for future reference @amal_antony, if you can post the actual code you are using and not a picture we can try to replicate a heap easier and help find a faster resolution for you :slight_smile:

Thanks for the suggestion, @warkolm. For debugging, we are now using the good old indexing API of ES. The error messages and the sample data exceeded the character limit. That's why I had to resort to external links and screenshots.

1 Like

Ahh fair enough, gist/pastebin/etc is good for that longer stuff!

I checked the second geometry and I can reproduce the issue in Lucene tessellator. If it is ok with you, I will open an issue and add the provided geometry for testing.

Thanks for the update, Ignacio.
I have been able to collect all the polygons that were failing to index.
https://raw.githubusercontent.com/amalantonygit/polygon-data/main/polygon.json

There are 16 records, which shows issues in ES versions 7.17 and 8.5. The data was successfully indexed in an ES 6.3.2 instance.

It would be great, if you can test out this data as well. @Ignacio_Vera Please do the needful to escalate the issue and produce a viable solution.

Thanks in advance.

Thank you, that is helpful.

I open Fix algorithm that chooses the bridge between a polygon and a hole by iverase · Pull Request #11988 · apache/lucene · GitHub

2 Likes

Hi @Ignacio_Vera.

Just needed a quick clarification regarding the bug you have identified.

You mentioned that you were able to reproduce the issue in Lucene tessellator when working on this polygon.

How about the set of 16 polygons shared as a file? Is it safe to say that these records are also affected by the same bug or should we investigate other possible issues?

Thanks in advance.

The issue above fixes all the polygons except the first one which clearly suffers from a different error. If you run the tessellator on it you get the following error:

java.lang.IllegalArgumentException: at least three non-collinear points required

Having a closer look into the multi-polygon, the issue is the following polygon:

{ "type": "Polygon", "coordinates":  [ [ [ 145.22954, -42.0 ], [ 145.2295402, -42.0 ], [ 145.2295404, -42.0 ], [ 145.22954, -42.0 ] ] ] }

It is such a tiny polygon that the current mathematics using naive double floating point arithmetic detects all points as collinear. There is already an issue related open in Lucene's repository:

This might not be so fast to be implemented.

Thanks for the input, @Ignacio_Vera.

Would it be reasonable to go with an old unsupported version of ES just because it allows these polygons to be ingested? If we are to wait for these bugfixes to be available as part of the next Lucene/ES release, how long would that usually take? Does Elastic Cloud suite of products have a quicker release cycle or patch policy?

Posing this as an open question to the community.

Just try the following in a 6.3.2 cluster:

PUT test
{
  "mappings": {
    "_doc": {
      "properties": {
        "location": {
          "type": "geo_shape"
        }
      }
    }
  }
}

POST test/_doc
{
  "location" : { "type": "MultiPolygon", "coordinates": [ [ [ [ 145.1194357, -42.0328663 ], [ 145.2394921, -42.0328663 ], [ 145.238194, -42.0324013 ], [ 145.2413307, -42.030857 ], [ 145.2421013, -42.0328663 ], [ 145.2453252, -42.0328663 ], [ 145.2451415, -42.0296059 ], [ 145.2423991, -42.0288757 ], [ 145.242294, -42.0270011 ], [ 145.2396978, -42.0263096 ], [ 145.2383414, -42.0245118 ], [ 145.23677, -42.0236206 ], [ 145.2365672, -42.0200124 ], [ 145.234043, -42.0193404 ], [ 145.2327576, -42.0180775 ], [ 145.245172, -42.0176479 ], [ 145.246755, -42.0170759 ], [ 145.2428411, -42.0148595 ], [ 145.2426304, -42.011107 ], [ 145.2455743, -42.011008 ], [ 145.2466708, -42.0075152 ], [ 145.2429881, -42.0065354 ], [ 145.242883, -42.004661 ], [ 145.2402109, -42.0039505 ], [ 145.2401058, -42.0020762 ], [ 145.2380872, -42.0013631 ], [ 145.2368416, -42.0042547 ], [ 145.234441, -42.0043383 ], [ 145.2337822, -42.0079475 ], [ 145.2367682, -42.0084112 ], [ 145.2376288, -42.0106883 ], [ 145.2399768, -42.0120204 ], [ 145.236817, -42.0134902 ], [ 145.2355708, -42.0163784 ], [ 145.234605, -42.0146504 ], [ 145.2330055, -42.011015 ], [ 145.2280009, -42.01052 ], [ 145.2277023, -42.0052257 ], [ 145.2260031, -42.0032782 ], [ 145.2245612, -42.0 ], [ 145.1194357, -42.0 ], [ 145.1194357, -42.0328663 ] ], [ [ 145.2367682, -42.0084112 ], [ 145.2370348, -42.0062198 ], [ 145.2404944, -42.0067536 ], [ 145.2398255, -42.009308 ], [ 145.2367682, -42.0084112 ] ] ], [ [ [ 145.22954, -42.0 ], [ 145.2295402, -42.0 ], [ 145.2295404, -42.0 ], [ 145.22954, -42.0 ] ] ] ] } 
}

That's the first polygon on the list, it fails with he following error:

{
  "error": {
    "root_cause": [
      {
        "type": "mapper_parsing_exception",
        "reason": "failed to parse [location]"
      }
    ],
    "type": "mapper_parsing_exception",
    "reason": "failed to parse [location]",
    "caused_by": {
      "type": "invalid_shape_exception",
      "reason": "Self-intersection at or near point (145.22954, -42.0, NaN)"
    }
  },
  "status": 400
}

Can you confirm it works for you?

Hi @Ignacio_Vera.

Getting the same error in 6.3.2, when trying to index it individually.

I must have overlooked this one. So, first polygon definitely has the self-intersection issue.

{
  "error": {
    "root_cause": [
      {
        "type": "mapper_parsing_exception",
        "reason": "failed to parse [location]"
      }
    ],
    "type": "mapper_parsing_exception",
    "reason": "failed to parse [location]",
    "caused_by": {
      "type": "invalid_shape_exception",
      "reason": "Self-intersection at or near point (145.22954, -42.0, NaN)"
    }
  },
  "status": 400
}