Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ Result:
See [Elasticsearch documentation on Cardinality](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-cardinality-aggregation.html)

> **Note**
> curenntly does not support nested feilds
> currently does not support nested fields

Example:

Expand Down
5 changes: 3 additions & 2 deletions src/components/Utils/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,12 +412,13 @@ export const askGuppyForTotalCounts = (
}).then((response) => response.json())
.then((response) => {
if (response.errors) {
throw new Error(`Error during download ${response.errors}`);
let errMsgs = response.errors.map(e => e.message).join('; ')
throw new Error(`Error during download: ${errMsgs}`);
}
return response.data._aggregation[type]._totalCount;
})
.catch((err) => {
throw new Error(`Error during download ${err}`);
throw new Error(`Error during download: ${err}`);
});
};

Expand Down
Loading