Elasticsearch 7.5.3 RequestError(400, ‘parse_exception’, ‘numeric value expected’) 执行地理多边形查询
Elasticsearch 7.5.3 RequestError(400, ‘parse_exception’, ‘numeric value expected’) performing geo-polygon query
我正在尝试使用 Elasticsearch 版本 7.5.3 执行地理多边形查询,运行 出现此异常:
elasticsearch.exceptions.RequestError: RequestError(400, 'parse_exception', 'numeric value expected')
我想检查 geo_point(旧位置)是否在多边形内部(见图)
我 运行 的查询如下所示:
{"query": {"bool": {"filter": [{"geo_polygon": {"oldlocation": {"points": [[[13.5398484, 52.4749785],
[13.5398659, 52.4749935], [13.5398546, 52.4749982], [13.5397788, 52.4750296], [13.5389007, 52.4753933],
[13.5388921, 52.4753861], [13.5377872, 52.4758742], [13.5378138, 52.4758965], [13.5373954, 52.4760827],
[13.5369355, 52.4762875], [13.5367481, 52.4763701], [13.5364353, 52.4765184], [13.5364011, 52.4765323],
[13.535975, 52.4767279], [13.5356914, 52.4768531], [13.5356448, 52.4768737], [13.535362, 52.4769839],
[13.535214, 52.4770416], [13.5349628, 52.477155], [13.5349379, 52.4771663], [13.5347827, 52.4772363],
[13.5345519, 52.4773405], [13.5340303, 52.4775759], [13.5328767, 52.478143], [13.5323198, 52.4784385],
[13.5317253, 52.4787061], [13.5312282, 52.4789213], [13.5307764, 52.4791131], [13.5299389, 52.4794829],
[13.5293515, 52.4797395], [13.5286661, 52.4800354], [13.5287545, 52.4801092], [13.5284565, 52.4802409],
[13.5284048, 52.4801947], [13.5275436, 52.4805356], [13.5271934, 52.4806953], [13.526298, 52.4810891],
[13.5259856, 52.4812337], [13.525967, 52.4812423], [13.5259913, 52.4812613], [13.5259789, 52.4812668],
[13.5259017, 52.4813007], [13.5258392, 52.4813281], [13.525775, 52.4813564], [13.5256823, 52.4813971],
[13.5255745, 52.4814444], [13.5255644, 52.4814048], [13.5253157, 52.4814952], [13.5252297, 52.4815259],
[13.5250438, 52.4816108], [13.524345, 52.4819155], [13.5242728, 52.4819448], [13.5238535, 52.4821318],
[13.5234755, 52.4822979], [13.5234328, 52.4823166],[13.5234006, 52.4823306], [13.5232052, 52.4824156],
[13.5230037, 52.4825032], [13.5229758, 52.4825154], [13.522804, 52.4825901], [13.522775, 52.4826027],
[13.5227391, 52.4826183], [13.5226911, 52.4826392], [13.5226551, 52.4826549], [13.5226191, 52.4826705],
[13.5225832, 52.4826861], [13.5225472, 52.4827018], [13.5225112, 52.4827174], [13.5224752, 52.4827331],
[13.5224393, 52.4827487], [13.5224033, 52.4827644], [13.5223673, 52.48278], [13.5223313, 52.4827957],
[13.5222954, 52.4828113], [13.5222754, 52.48282], [13.5220401, 52.4829255], [13.5219051, 52.482986],
[13.5218413, 52.4830146], [13.5218118, 52.4830279], [13.5216973, 52.4830792], [13.5213143, 52.4832509],
[13.5210804, 52.4833505], [13.521009, 52.483382], [13.520864, 52.483446], [13.5206556, 52.4835405],
[13.520439, 52.4836357], [13.5201599, 52.4837576], [13.5199238, 52.4838608], [13.5196144, 52.483996],
[13.5195599, 52.4840194], [13.5193017, 52.4841305], [13.5191103, 52.4842169], [13.5190407, 52.484248],
[13.5189492, 52.4842889], [13.518886, 52.4843172], [13.5188179, 52.4843474], [13.5186693, 52.4844133],
[13.5183593, 52.4845507], [13.5181433, 52.4846465], [13.5179331, 52.4847397], [13.5176824, 52.4848509],
[13.5174737, 52.4849409], [13.5171481, 52.4850813], [13.5170409, 52.4851276], [13.5169533, 52.4851653],
[13.5169575,52.4851758], [13.5167206, 52.4852946], [13.5164913, 52.4854078], [13.516469, 52.4854189],
[13.5162595, 52.4855223], [13.516223, 52.4854914], [13.5159278, 52.4856198], [13.5159213, 52.4856226],
[13.5158543, 52.4856517], [13.5156265, 52.4857502], [13.5149396, 52.4854663], [13.514831, 52.4855139],
[13.5147218, 52.4855657], [13.5146654, 52.4855407], [13.514574, 52.4854971], [13.5145037, 52.4854664],
[13.513918, 52.4852099], [13.5137353, 52.4851299], [13.5134074, 52.484987], [13.5133578, 52.4849684],
[13.5129115, 52.4848173], [13.5123753, 52.4846634], [13.5123911, 52.4846972], [13.5119004, 52.4845518],
[13.5118571, 52.484539], [13.5118457, 52.4845357], [13.5116985, 52.4844937], [13.5115608, 52.4844652],
[13.5114195, 52.484436], [13.5114101, 52.484435], [13.511346, 52.4844284], [13.5112377, 52.4844131],
[13.5110913, 52.4844009], [13.5109572, 52.4843945], [13.5109398, 52.4843945], [13.5108833, 52.4843945],
[13.5108194, 52.4843954], [13.5108108, 52.4843955], [13.5107143, 52.4843977], [13.5106944, 52.4843982],
[13.5103409, 52.4844062], [13.5100605, 52.4844119], [13.5097764, 52.4844171], [13.5091922, 52.4844291],
[13.5087411, 52.4844384], [13.5085547, 52.4844419], [13.5085161, 52.4844427], [13.5084924, 52.4844432],
[13.5084337, 52.4844445], [13.5082118, 52.4844493], [13.5076765, 52.4844601], [13.5076216, 52.4844612],
[13.5074269, 52.4844653], [13.5073017, 52.484468], [13.5072728, 52.4844686], [13.5063578, 52.484487],
[13.5058572, 52.4844971], [13.5057377, 52.4844996], [13.5056211, 52.4844977], [13.505658, 52.4844328],
[13.5041421, 52.4840511], [13.5037932, 52.483963], [13.5032865, 52.4838354], [13.503238, 52.4838232],
[13.502503, 52.4836383], [13.5018063, 52.4834625], [13.5014351, 52.4833727], [13.5014178, 52.4833695],
[13.5014001, 52.4833674], [13.5013821, 52.4833663], [13.5013641, 52.4833664], [13.5013461, 52.4833674],
[13.5013284, 52.4833696], [13.5013111, 52.4833727], [13.5012944, 52.4833769], [13.5012785, 52.4833821],
[13.5012634, 52.4833882], [13.5012494, 52.4833951], [13.5012365, 52.4834028], [13.5015938, 52.4830464],
[13.5016251, 52.4830092], [13.5016319, 52.4829993], [13.5018433, 52.482758], [13.5018333, 52.4827554],
[13.5018687, 52.4827113], [13.5019087, 52.4826577], [13.5019476, 52.4826051], [13.501961, 52.4825926],
[13.5019843, 52.4825719], [13.5018907, 52.482574], [13.5019016, 52.4825565],[13.5020548, 52.4822662],
[13.5021331, 52.4821159], [13.502241, 52.4819089], [13.5022496, 52.4818932], [13.5027035, 52.4810658],
[13.5032179, 52.4801381], [13.5032578, 52.4800663], [13.5032669, 52.4800498], [13.5038875, 52.4789247],
[13.5043241, 52.4781245], [13.5060978, 52.4765039], [13.5061002, 52.4765003], [13.5077232, 52.4750182],
[13.5078467, 52.4749038], [13.5079375, 52.4749197], [13.5080158, 52.4749318], [13.508318, 52.4749771],
[13.5084518, 52.4749975], [13.5108356, 52.4753526], [13.5113784, 52.4754315], [13.5126318, 52.4756136],
[13.5129681, 52.4756613], [13.5130747, 52.4756709], [13.5131815, 52.4756796], [13.5132885, 52.4756873],
[13.5133957, 52.4756942], [13.5135031, 52.4757001], [13.5136105, 52.4757051], [13.5137181, 52.4757092],
[13.5138257, 52.4757123], [13.5139334, 52.4757145], [13.5140412, 52.4757158], [13.5141373, 52.4757151],
[13.5142334, 52.4757134], [13.5143294, 52.4757107], [13.5144253, 52.4757071], [13.5145211, 52.4757024],
[13.5146168, 52.4756967], [13.5147123, 52.47569], [13.5148076, 52.4756824], [13.5149196, 52.4756718],
[13.5150313, 52.47566], [13.5151426, 52.475647], [13.5152535, 52.4756327], [13.515364, 52.4756173],
[13.515474, 52.4756006], [13.5155835, 52.4755828], [13.5156924, 52.4755637], [13.5158008, 52.4755435],
[13.5159086, 52.475522], [13.5160157, 52.4754994], [13.5161221, 52.4754757], [13.5162278, 52.4754507],
[13.516332, 52.4754246], [13.516426, 52.4753993], [13.5165186, 52.475373], [13.5166105, 52.4753459],
[13.5167016, 52.4753179], [13.516792, 52.475289], [13.5168817, 52.4752592], [13.5181676, 52.4748251],
[13.5191747, 52.4744797], [13.5193106, 52.4744331], [13.5194647, 52.4743802], [13.5199406, 52.4742157],
[13.5200821, 52.4741668], [13.5200911, 52.4741636], [13.5203154, 52.47407], [13.5206511, 52.4743779],
[13.5210618, 52.474756], [13.5214429, 52.4751391], [13.5215808, 52.4752175], [13.5216009, 52.4752065],
[13.5216423, 52.475184], [13.5216445, 52.4751827], [13.5217102, 52.4751466], [13.5217504, 52.4751247],
[13.5224304, 52.4747527], [13.5228941, 52.4744424], [13.5231622, 52.4742419], [13.5236676, 52.4738637],
[13.5238858, 52.4736904], [13.5243473, 52.4733196], [13.5255445, 52.4723557], [13.5260847, 52.4718984],
[13.5269525, 52.4711327], [13.5274249, 52.470716], [13.5275293, 52.4706239], [13.5282355, 52.4700437],
[13.5290782, 52.4693418], [13.5307297, 52.4679728], [13.530772, 52.4679377], [13.5312512, 52.4682981],
[13.5313909, 52.4684031], [13.5314324, 52.4683891], [13.5323169, 52.4690828], [13.5330266, 52.4696422],
[13.5340921, 52.4704809], [13.5343845, 52.4707105], [13.5349151, 52.4711392], [13.5356348, 52.4716993],
[13.5356686, 52.4717255], [13.5356961, 52.4717469], [13.5363845, 52.4722826], [13.5373896, 52.4730594],
[13.5378125, 52.473386], [13.5384584, 52.4738849], [13.5385079, 52.4739232], [13.5385539, 52.4739587],
[13.5386059, 52.4739994], [13.5389224, 52.4742466], [13.5390354, 52.4743334], [13.5394999, 52.4746966],
[13.53953, 52.4747226], [13.5395731, 52.4747605], [13.5398309, 52.4749647], [13.5398484, 52.4749785]]]}}}}]}}}
我不明白问题出在哪里,因为多边形 (geojson) 似乎是合法的:
polygon which should be checked for intersection
事实上,正如@ExploZe 所描述的那样,它只是 "points": [[[
上的额外 []
。
感谢您的帮助!
我正在尝试使用 Elasticsearch 版本 7.5.3 执行地理多边形查询,运行 出现此异常:
elasticsearch.exceptions.RequestError: RequestError(400, 'parse_exception', 'numeric value expected')
我想检查 geo_point(旧位置)是否在多边形内部(见图)
我 运行 的查询如下所示:
{"query": {"bool": {"filter": [{"geo_polygon": {"oldlocation": {"points": [[[13.5398484, 52.4749785],
[13.5398659, 52.4749935], [13.5398546, 52.4749982], [13.5397788, 52.4750296], [13.5389007, 52.4753933],
[13.5388921, 52.4753861], [13.5377872, 52.4758742], [13.5378138, 52.4758965], [13.5373954, 52.4760827],
[13.5369355, 52.4762875], [13.5367481, 52.4763701], [13.5364353, 52.4765184], [13.5364011, 52.4765323],
[13.535975, 52.4767279], [13.5356914, 52.4768531], [13.5356448, 52.4768737], [13.535362, 52.4769839],
[13.535214, 52.4770416], [13.5349628, 52.477155], [13.5349379, 52.4771663], [13.5347827, 52.4772363],
[13.5345519, 52.4773405], [13.5340303, 52.4775759], [13.5328767, 52.478143], [13.5323198, 52.4784385],
[13.5317253, 52.4787061], [13.5312282, 52.4789213], [13.5307764, 52.4791131], [13.5299389, 52.4794829],
[13.5293515, 52.4797395], [13.5286661, 52.4800354], [13.5287545, 52.4801092], [13.5284565, 52.4802409],
[13.5284048, 52.4801947], [13.5275436, 52.4805356], [13.5271934, 52.4806953], [13.526298, 52.4810891],
[13.5259856, 52.4812337], [13.525967, 52.4812423], [13.5259913, 52.4812613], [13.5259789, 52.4812668],
[13.5259017, 52.4813007], [13.5258392, 52.4813281], [13.525775, 52.4813564], [13.5256823, 52.4813971],
[13.5255745, 52.4814444], [13.5255644, 52.4814048], [13.5253157, 52.4814952], [13.5252297, 52.4815259],
[13.5250438, 52.4816108], [13.524345, 52.4819155], [13.5242728, 52.4819448], [13.5238535, 52.4821318],
[13.5234755, 52.4822979], [13.5234328, 52.4823166],[13.5234006, 52.4823306], [13.5232052, 52.4824156],
[13.5230037, 52.4825032], [13.5229758, 52.4825154], [13.522804, 52.4825901], [13.522775, 52.4826027],
[13.5227391, 52.4826183], [13.5226911, 52.4826392], [13.5226551, 52.4826549], [13.5226191, 52.4826705],
[13.5225832, 52.4826861], [13.5225472, 52.4827018], [13.5225112, 52.4827174], [13.5224752, 52.4827331],
[13.5224393, 52.4827487], [13.5224033, 52.4827644], [13.5223673, 52.48278], [13.5223313, 52.4827957],
[13.5222954, 52.4828113], [13.5222754, 52.48282], [13.5220401, 52.4829255], [13.5219051, 52.482986],
[13.5218413, 52.4830146], [13.5218118, 52.4830279], [13.5216973, 52.4830792], [13.5213143, 52.4832509],
[13.5210804, 52.4833505], [13.521009, 52.483382], [13.520864, 52.483446], [13.5206556, 52.4835405],
[13.520439, 52.4836357], [13.5201599, 52.4837576], [13.5199238, 52.4838608], [13.5196144, 52.483996],
[13.5195599, 52.4840194], [13.5193017, 52.4841305], [13.5191103, 52.4842169], [13.5190407, 52.484248],
[13.5189492, 52.4842889], [13.518886, 52.4843172], [13.5188179, 52.4843474], [13.5186693, 52.4844133],
[13.5183593, 52.4845507], [13.5181433, 52.4846465], [13.5179331, 52.4847397], [13.5176824, 52.4848509],
[13.5174737, 52.4849409], [13.5171481, 52.4850813], [13.5170409, 52.4851276], [13.5169533, 52.4851653],
[13.5169575,52.4851758], [13.5167206, 52.4852946], [13.5164913, 52.4854078], [13.516469, 52.4854189],
[13.5162595, 52.4855223], [13.516223, 52.4854914], [13.5159278, 52.4856198], [13.5159213, 52.4856226],
[13.5158543, 52.4856517], [13.5156265, 52.4857502], [13.5149396, 52.4854663], [13.514831, 52.4855139],
[13.5147218, 52.4855657], [13.5146654, 52.4855407], [13.514574, 52.4854971], [13.5145037, 52.4854664],
[13.513918, 52.4852099], [13.5137353, 52.4851299], [13.5134074, 52.484987], [13.5133578, 52.4849684],
[13.5129115, 52.4848173], [13.5123753, 52.4846634], [13.5123911, 52.4846972], [13.5119004, 52.4845518],
[13.5118571, 52.484539], [13.5118457, 52.4845357], [13.5116985, 52.4844937], [13.5115608, 52.4844652],
[13.5114195, 52.484436], [13.5114101, 52.484435], [13.511346, 52.4844284], [13.5112377, 52.4844131],
[13.5110913, 52.4844009], [13.5109572, 52.4843945], [13.5109398, 52.4843945], [13.5108833, 52.4843945],
[13.5108194, 52.4843954], [13.5108108, 52.4843955], [13.5107143, 52.4843977], [13.5106944, 52.4843982],
[13.5103409, 52.4844062], [13.5100605, 52.4844119], [13.5097764, 52.4844171], [13.5091922, 52.4844291],
[13.5087411, 52.4844384], [13.5085547, 52.4844419], [13.5085161, 52.4844427], [13.5084924, 52.4844432],
[13.5084337, 52.4844445], [13.5082118, 52.4844493], [13.5076765, 52.4844601], [13.5076216, 52.4844612],
[13.5074269, 52.4844653], [13.5073017, 52.484468], [13.5072728, 52.4844686], [13.5063578, 52.484487],
[13.5058572, 52.4844971], [13.5057377, 52.4844996], [13.5056211, 52.4844977], [13.505658, 52.4844328],
[13.5041421, 52.4840511], [13.5037932, 52.483963], [13.5032865, 52.4838354], [13.503238, 52.4838232],
[13.502503, 52.4836383], [13.5018063, 52.4834625], [13.5014351, 52.4833727], [13.5014178, 52.4833695],
[13.5014001, 52.4833674], [13.5013821, 52.4833663], [13.5013641, 52.4833664], [13.5013461, 52.4833674],
[13.5013284, 52.4833696], [13.5013111, 52.4833727], [13.5012944, 52.4833769], [13.5012785, 52.4833821],
[13.5012634, 52.4833882], [13.5012494, 52.4833951], [13.5012365, 52.4834028], [13.5015938, 52.4830464],
[13.5016251, 52.4830092], [13.5016319, 52.4829993], [13.5018433, 52.482758], [13.5018333, 52.4827554],
[13.5018687, 52.4827113], [13.5019087, 52.4826577], [13.5019476, 52.4826051], [13.501961, 52.4825926],
[13.5019843, 52.4825719], [13.5018907, 52.482574], [13.5019016, 52.4825565],[13.5020548, 52.4822662],
[13.5021331, 52.4821159], [13.502241, 52.4819089], [13.5022496, 52.4818932], [13.5027035, 52.4810658],
[13.5032179, 52.4801381], [13.5032578, 52.4800663], [13.5032669, 52.4800498], [13.5038875, 52.4789247],
[13.5043241, 52.4781245], [13.5060978, 52.4765039], [13.5061002, 52.4765003], [13.5077232, 52.4750182],
[13.5078467, 52.4749038], [13.5079375, 52.4749197], [13.5080158, 52.4749318], [13.508318, 52.4749771],
[13.5084518, 52.4749975], [13.5108356, 52.4753526], [13.5113784, 52.4754315], [13.5126318, 52.4756136],
[13.5129681, 52.4756613], [13.5130747, 52.4756709], [13.5131815, 52.4756796], [13.5132885, 52.4756873],
[13.5133957, 52.4756942], [13.5135031, 52.4757001], [13.5136105, 52.4757051], [13.5137181, 52.4757092],
[13.5138257, 52.4757123], [13.5139334, 52.4757145], [13.5140412, 52.4757158], [13.5141373, 52.4757151],
[13.5142334, 52.4757134], [13.5143294, 52.4757107], [13.5144253, 52.4757071], [13.5145211, 52.4757024],
[13.5146168, 52.4756967], [13.5147123, 52.47569], [13.5148076, 52.4756824], [13.5149196, 52.4756718],
[13.5150313, 52.47566], [13.5151426, 52.475647], [13.5152535, 52.4756327], [13.515364, 52.4756173],
[13.515474, 52.4756006], [13.5155835, 52.4755828], [13.5156924, 52.4755637], [13.5158008, 52.4755435],
[13.5159086, 52.475522], [13.5160157, 52.4754994], [13.5161221, 52.4754757], [13.5162278, 52.4754507],
[13.516332, 52.4754246], [13.516426, 52.4753993], [13.5165186, 52.475373], [13.5166105, 52.4753459],
[13.5167016, 52.4753179], [13.516792, 52.475289], [13.5168817, 52.4752592], [13.5181676, 52.4748251],
[13.5191747, 52.4744797], [13.5193106, 52.4744331], [13.5194647, 52.4743802], [13.5199406, 52.4742157],
[13.5200821, 52.4741668], [13.5200911, 52.4741636], [13.5203154, 52.47407], [13.5206511, 52.4743779],
[13.5210618, 52.474756], [13.5214429, 52.4751391], [13.5215808, 52.4752175], [13.5216009, 52.4752065],
[13.5216423, 52.475184], [13.5216445, 52.4751827], [13.5217102, 52.4751466], [13.5217504, 52.4751247],
[13.5224304, 52.4747527], [13.5228941, 52.4744424], [13.5231622, 52.4742419], [13.5236676, 52.4738637],
[13.5238858, 52.4736904], [13.5243473, 52.4733196], [13.5255445, 52.4723557], [13.5260847, 52.4718984],
[13.5269525, 52.4711327], [13.5274249, 52.470716], [13.5275293, 52.4706239], [13.5282355, 52.4700437],
[13.5290782, 52.4693418], [13.5307297, 52.4679728], [13.530772, 52.4679377], [13.5312512, 52.4682981],
[13.5313909, 52.4684031], [13.5314324, 52.4683891], [13.5323169, 52.4690828], [13.5330266, 52.4696422],
[13.5340921, 52.4704809], [13.5343845, 52.4707105], [13.5349151, 52.4711392], [13.5356348, 52.4716993],
[13.5356686, 52.4717255], [13.5356961, 52.4717469], [13.5363845, 52.4722826], [13.5373896, 52.4730594],
[13.5378125, 52.473386], [13.5384584, 52.4738849], [13.5385079, 52.4739232], [13.5385539, 52.4739587],
[13.5386059, 52.4739994], [13.5389224, 52.4742466], [13.5390354, 52.4743334], [13.5394999, 52.4746966],
[13.53953, 52.4747226], [13.5395731, 52.4747605], [13.5398309, 52.4749647], [13.5398484, 52.4749785]]]}}}}]}}}
我不明白问题出在哪里,因为多边形 (geojson) 似乎是合法的: polygon which should be checked for intersection
事实上,正如@ExploZe 所描述的那样,它只是 "points": [[[
上的额外 []
。
感谢您的帮助!