Skip to content

Commit b42ba64

Browse files
authored
[DOCS] Fixes geo function field names. (#83198)
1 parent 1e1f57d commit b42ba64

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

docs/reference/ml/anomaly-detection/functions/ml-geo-functions.asciidoc

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ PUT _ml/anomaly_detectors/example1
3535
"analysis_config": {
3636
"detectors": [{
3737
"function" : "lat_long",
38-
"field_name" : "transactionCoordinates",
39-
"by_field_name" : "creditCardNumber"
38+
"field_name" : "transaction_coordinates",
39+
"by_field_name" : "credit_card_number"
4040
}]
4141
},
4242
"data_description": {
@@ -49,22 +49,23 @@ PUT _ml/anomaly_detectors/example1
4949

5050
If you use this `lat_long` function in a detector in your {anomaly-job}, it
5151
detects anomalies where the geographic location of a credit card transaction is
52-
unusual for a particular customer’s credit card. An anomaly might indicate fraud.
52+
unusual for a particular customer’s credit card. An anomaly might indicate
53+
fraud.
5354

54-
IMPORTANT: The `field_name` that you supply must be a single string that contains
55-
two comma-separated numbers of the form `latitude,longitude`, a `geo_point` field,
56-
a `geo_shape` field that contains point values, or a `geo_centroid` aggregation.
57-
The `latitude` and `longitude` must be in the range -180 to 180 and represent a
58-
point on the surface of the Earth.
55+
IMPORTANT: The `field_name` that you supply must be a single string that
56+
contains two comma-separated numbers of the form `latitude,longitude`, a
57+
`geo_point` field, a `geo_shape` field that contains point values, or a
58+
`geo_centroid` aggregation. The `latitude` and `longitude` must be in the range
59+
-180 to 180 and represent a point on the surface of the Earth.
5960

6061
For example, JSON data might contain the following transaction coordinates:
6162

6263
[source,js]
6364
--------------------------------------------------
6465
{
6566
"time": 1460464275,
66-
"transactionCoordinates": "40.7,-74.0",
67-
"creditCardNumber": "1234123412341234"
67+
"transaction_coordinates": "40.7,-74.0",
68+
"credit_card_number": "1234123412341234"
6869
}
6970
--------------------------------------------------
7071
// NOTCONSOLE

0 commit comments

Comments
 (0)