我收到了来自OCR应用程序的响应,该响应是类似于Google Vision OCR响应的JSON。我想将其放入Elasticsearch中以执行形状查询。尽管我可以将JSON放入Elasticsearch,但是我无法提出完美的schema
和mapping
来基于形状或boundingPoly
和bgColor
进行搜索。 >
我对[[Elasticsearch
来说还很陌生,我有几个问题。((1)
如何基于boundingPoly
和bgColor
执行搜索?((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中以执行形状查询。虽然我可以把...
geo_shape
用于...地理形状。因此,您必须要么