pelias icon indicating copy to clipboard operation
pelias copied to clipboard

Error: "'venue' is an invalid layers parameter"

Open gabrielkuettel opened this issue 1 year ago • 3 comments

I setup the North America project using the Docker instructions. When I hit the example endpoint in the docs, /v1/search?text=YMCA&layers=venue,address, I get the following error in the response:

"'venue' is an invalid layers parameter. Valid options: coarse,address,postalcode,locality,neighbourhood,localadmin,county,region,macrohood,borough,country,dependency"

YMCA also does not return any results even when layers isn't specified. Everything else seems to work. Any ideas?

gabrielkuettel avatar Aug 15 '24 21:08 gabrielkuettel

You can run pelias elastic stats to confirm you have records from the venue layer in your index.

Otherwise restarting your pelias/api instance should do the trick.

missinglink avatar Aug 18 '24 09:08 missinglink

Looks like it's missing based on this output. Should I try to re-download and initialize? Otherwise is there a way to troubleshoot this? I've bootstrapped this config before without issues.

{
  "took" : 17,
  "timed_out" : false,
  "_shards" : {
    "total" : 4,
    "successful" : 4,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 10000,
      "relation" : "gte"
    },
    "max_score" : null,
    "hits" : [ ]
  },
  "aggregations" : {
    "sources" : {
      "doc_count_error_upper_bound" : 0,
      "sum_other_doc_count" : 0,
      "buckets" : [
        {
          "key" : "openaddresses",
          "doc_count" : 206849102,
          "layers" : {
            "doc_count_error_upper_bound" : 0,
            "sum_other_doc_count" : 0,
            "buckets" : [
              {
                "key" : "address",
                "doc_count" : 206849102
              }
            ]
          }
        },
        {
          "key" : "whosonfirst",
          "doc_count" : 1383015,
          "layers" : {
            "doc_count_error_upper_bound" : 0,
            "sum_other_doc_count" : 0,
            "buckets" : [
              {
                "key" : "postalcode",
                "doc_count" : 842717
              },
              {
                "key" : "locality",
                "doc_count" : 454892
              },
              {
                "key" : "neighbourhood",
                "doc_count" : 53170
              },
              {
                "key" : "localadmin",
                "doc_count" : 23902
              },
              {
                "key" : "county",
                "doc_count" : 7598
              },
              {
                "key" : "region",
                "doc_count" : 428
              },
              {
                "key" : "macrohood",
                "doc_count" : 210
              },
              {
                "key" : "borough",
                "doc_count" : 65
              },
              {
                "key" : "country",
                "doc_count" : 27
              },
              {
                "key" : "dependency",
                "doc_count" : 6
              }
            ]
          }
        }
      ]
    }
  }
}

gabrielkuettel avatar Aug 20 '24 20:08 gabrielkuettel

It looks like importing openstreetmap (the only source with venues) either didn't run or failed.

You can try just reimporting openstreetmap

missinglink avatar Aug 21 '24 13:08 missinglink