koopjs / koop-provider-elasticsearch

A provider for koop that can connect to one or more elastic search instances and turn indices/aliases into individual feature services.
Apache License 2.0
13 stars 4 forks source link

Trouble with Join Indexes #19

Open keithfraley opened 3 years ago

keithfraley commented 3 years ago

This is a subset of our config file, for some reason the join is not working, it comes in as a table, but even the table doesnt populate with data, not sure what we are doing wrong

`{

`"esConnections":` {

    "y": {

        "id": "y",

        "protocol": "https://",

        "hosts": [

            "yyy"

        ],

        "shapeIndices": {

            "zzz": {

                "geometryField": "GEOMETRY",

                "geometryType": "geo_point",

                "joinField": "MMSI"

            }

        },

        "indices": {

            "ddd": {

                "index": "hhh",

                "allowMultiPoint": false,

                "returnFields": [

                    "CAPABILITIES",

                    "DECK_SIZE",

                    "FLAG",

                    "LINK_TO_SPECS",

                    "OWNER",

                    "TOP_SPEED",

                    "SHIPNAME",

                    "YEAR_BUILT",

                    "VESSEL CLASS"

                ],

                "aggregations": [],

                "shapeIndex": {

                    "name": "zzz",

                    "joinField": "MMSI"
                },

                "maxResults": 1000

            }
        }
    }
}

}`

dhatcher commented 3 years ago

I believe the joinField you specify under shapeIndex must also be in your returnFields. Otherwise it won't be able to match to the correct geometry.

dhatcher commented 3 years ago

I think dateFields also needs to exist even if it's an empty array.

keithfraley commented 3 years ago

noticed that joined indexs (at least the ones we tested) are not showing up in phone based browser, I will continue to test to confirm

keithfraley commented 3 years ago

im closing