mirror of https://gitee.com/bigwinds/arangodb
[3.4] Ignore invaild geo coordinates when indexing. (#7723)
This commit is contained in:
parent
e6983a35ed
commit
6cc70cd615
|
@ -1,6 +1,13 @@
|
||||||
v3.4.1 (XXXX-XX-XX)
|
v3.4.1 (XXXX-XX-XX)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
* reverted accidental change to error handling in geo index
|
||||||
|
|
||||||
|
In previous versions, if non-valid geo coordinates were contained in the
|
||||||
|
indexed field of a document, the document was simply ignored an not indexed.
|
||||||
|
In 3.4.0, this was accidentally changed to generate an error, which caused
|
||||||
|
the upgrade procedure to break in some cases.
|
||||||
|
|
||||||
* fixed TypeError being thrown instead of validation errors when Foxx manifest
|
* fixed TypeError being thrown instead of validation errors when Foxx manifest
|
||||||
validation fails
|
validation fails
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,9 @@ Result Index::indexCells(VPackSlice const& doc, std::vector<S2CellId>& cells,
|
||||||
S2LatLng ll = S2LatLng::FromDegrees(lat.getNumericValue<double>(),
|
S2LatLng ll = S2LatLng::FromDegrees(lat.getNumericValue<double>(),
|
||||||
lon.getNumericValue<double>());
|
lon.getNumericValue<double>());
|
||||||
if (!ll.is_valid()) {
|
if (!ll.is_valid()) {
|
||||||
return TRI_ERROR_QUERY_INVALID_GEO_VALUE;
|
LOG_TOPIC(DEBUG, arangodb::Logger::FIXME)
|
||||||
|
<< "illegal geo-coordinates, ignoring entry";
|
||||||
|
return TRI_ERROR_NO_ERROR;
|
||||||
}
|
}
|
||||||
centroid = ll.ToPoint();
|
centroid = ll.ToPoint();
|
||||||
cells.emplace_back(centroid);
|
cells.emplace_back(centroid);
|
||||||
|
|
Loading…
Reference in New Issue