xy point field type

    Create a mapping with an xy point field type:

    copy

    xy points can be indexed in the following formats:

    • An object with x and y coordinates
    1. {
    2. "point": {
    3. "x": 0.5,
    4. }
    5. }
    • A string in the “x, y” format

    copy

    • An array in the [x, y] format
    1. {
    2. "point": [0.5, 4.5]
    3. }

    copy

    copy

    • GeoJSON format
    1. PUT testindex1/_doc/5
    2. {
    3. "point" : {
    4. "type" : "Point",
    5. "coordinates" : [0.5, 4.5]
    6. }

    In all xy point formats, the coordinates must be specified in the x, y order.

    The following table lists the parameters accepted by xy point field types. All parameters are optional.