【发布时间】:2016-08-29 18:40:58
【问题描述】:
我有兴趣将一些 CSV 文件中的一些数据加载到 OrientDB 中,这些文件包含 WGS84 Lat/Long 中的空间坐标。
我正在使用 OrientDB 2.2.8 并将 lucene spatial module 添加到我的 $ORIENTDB_HOME/lib 目录中。
我正在使用 ETL 将我的数据加载到数据库中,并希望添加空间索引,但我不确定如何执行此操作。
假设我的 CSV 文件包含以下列:
- 标签(字符串)
- 纬度(浮点数)
- 经度(浮点数)
我已经在我的 ETL 中尝试过这个:
"loader": {
"orientdb": {
"dbURL": "plocal:myDatabase.orientdb",
"dbType": "graph",
"batchCommit": 1000,
"classes": [ { "name": "vertex", "extends", "V" } ],
"indexes": [ { "class": "vertex", "fields":["Label:string"], "type":"UNIQUE" },
{ "class": "Label", "fields":["Latitude:float","Longitude:float"], "type":"SPATIAL" }
]
}
}
但它不起作用。我收到以下错误消息:
ETL process has problem: com.orientechnologies.orient.core.index.OIndexException: Index with type SPATIAL and algorithm null does not exist.
有人研究过通过 ETL 创建空间索引吗?我在这方面看到的大部分内容都是使用 Java 或通过direct query。
提前感谢您的任何建议。
【问题讨论】:
-
您好,您可以发布整个代码吗?
-
我认为您还必须指定算法“type”:“SPATIAL”,“algorithm”:“LUCENE”,但我得到了同样的例外。你能在github上打开一个问题吗?
标签: orientdb orientdb2.2 orientdb-etl