# API: /dataset/suggest/ Elasticsearch errors

**URL:** <https://discourse.gbif.org/t/api-dataset-suggest-elasticsearch-errors/2206>\
**Category:** Data Use\
**Created:** [June 12, 2020, 12:12am UTC](https://discourse.gbif.org/t/api-dataset-suggest-elasticsearch-errors/2206 "2020-06-12T00:12:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sckott](https://sea1.discourse-cdn.com/gbif1/user_avatar/discourse.gbif.org/sckott/32/122_2.png) [@sckott](https://discourse.gbif.org/u/sckott)\
**Post date:** [June 12, 2020, 12:12am UTC](https://discourse.gbif.org/t/api-dataset-suggest-elasticsearch-errors/2206/1 "2020-06-12T00:12:06Z")

</div>

Noticed recently in `rgbif` examples that some `/dataset/suggest/` queries that used to work are no longer working. E.g.,

```auto
 curl -v 'https://api.gbif.org/v1/dataset/suggest?limit=5&keyword=france' | jq .

```

```auto
> GET /v1/dataset/suggest?limit=5&keyword=france HTTP/2
> Host: api.gbif.org
> User-Agent: curl/7.64.1
> Accept: */*
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
< HTTP/2 500 ...

{
  "timestamp": "2020-06-12T00:05:36.737+0000",
  "status": 500,
  "error": "Internal Server Error",
  "message": "Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]",
  "path": "/dataset/suggest"
}

```

Seems like all queries that include the `q` param do work though, so perhaps `q` parameter is now required for a successful query?

---

<div class="post-metadata">

**Author:** ![trobertson](https://sea1.discourse-cdn.com/gbif1/user_avatar/discourse.gbif.org/trobertson/32/312_2.png) [@trobertson](https://discourse.gbif.org/u/trobertson)\
**Post date:** [June 15, 2020, 8:15am UTC](https://discourse.gbif.org/t/api-dataset-suggest-elasticsearch-errors/2206/2 "2020-06-15T08:15:28Z")

</div>

Thanks @sckott - we recently refactored some code around this, and seemingly a bug has crept in as it was not intended to change anything. I’ve opened [https://github.com/gbif/registry/issues/200](https://github.com/gbif/registry/issues/200)

---

<div class="post-metadata">

**Author:** ![sckott](https://sea1.discourse-cdn.com/gbif1/user_avatar/discourse.gbif.org/sckott/32/122_2.png) [@sckott](https://discourse.gbif.org/u/sckott)\
**Post date:** [June 16, 2020, 6:56pm UTC](https://discourse.gbif.org/t/api-dataset-suggest-elasticsearch-errors/2206/3 "2020-06-16T18:56:43Z")

</div>

Thanks Tim!

Related-ish: I assume Elasticsearch errors aren’t sent down in the payload on purpose. Or are they? Curious to know in case I need to change my error catching code

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/gbif1/original/1X/d2525d53d815eb0c992cc44730ed8a6a1be1dbb5.png) [@system](https://discourse.gbif.org/u/system)\
**Post date:** [July 17, 2020, 4:56am UTC](https://discourse.gbif.org/t/api-dataset-suggest-elasticsearch-errors/2206/4 "2020-07-17T04:56:52Z")

</div>

Closed on July 17, 2020, 4:56am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
