Elasticsearch Shape查询可从嵌套JSON(Google OCR响应)中找到边界多边形和背景色

问题描述 投票:0回答:1

我收到了来自OCR应用程序的响应,该响应是类似于Google Vision OCR响应的JSON。我想将其放入Elasticsearch中以执行形状查询。尽管我可以将JSON放入Elasticsearch,但是我无法提出完美的schemamapping来基于形状或boundingPolybgColor进行搜索。 >

我对[[Elasticsearch

来说还很陌生,我有几个问题。

((1)

如何基于boundingPolybgColor执行搜索?

((2)

我是否需要更改执行搜索的架构,还是可以保持原样?什么是最适合我目的的方案和映射?

((3)

另外,我想基于bgColor进行搜索。我该如何实现?
我尝试使用Geo-shape query,但未能以正确的结果实现它。另外,Geo-shape query中的一个限制是,值必须介于90-180之间。我认为可以通过标准化值来处理该部分。

样本JSON:

{ "responses": [{ "textAnnotations": [{ "description": "were", "boundingPoly": { "vertices": [{ "x": 112, "y": 5 }, { "x": 333, "y": 5 }, { "x": 333, "y": 93 }, { "x": 112, "y": 93 } ], "confidence": 99 }, "wordInfo": { "length": 4, "width": 221, "height": 88, "bgColor": [ 255, 255, 251 ] } }, { "description": "gonna", "boundingPoly": { "vertices": [{ "x": 338, "y": 5 }, { "x": 589, "y": 5 }, { "x": 589, "y": 93 }, { "x": 338, "y": 93 } ], "confidence": 99 }, "wordInfo": { "length": 5, "width": 251, "height": 88, "bgColor": [ 255, 255, 255 ] } } ] }] }
提前感谢!

我收到了来自OCR应用程序的响应,该响应是类似于Google Vision OCR响应的JSON。我想将其放入Elasticsearch中以执行形状查询。虽然我可以把...

python elasticsearch geojson elasticsearch-geo-shape
1个回答
0
投票
geo_shape用于...地理形状。因此,您必须要么
© www.soinside.com 2019 - 2024. All rights reserved.