From b80463199605db43216ce76aa1cb2cb4ffdb7cbd Mon Sep 17 00:00:00 2001 From: Brandon Farmer Date: Wed, 16 Jan 2019 13:06:56 -0800 Subject: [PATCH] Improve meta query for tags --- ui/src/shared/apis/v2/queryBuilder.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/src/shared/apis/v2/queryBuilder.ts b/ui/src/shared/apis/v2/queryBuilder.ts index 24c73404ae..3f0f5666a9 100644 --- a/ui/src/shared/apis/v2/queryBuilder.ts +++ b/ui/src/shared/apis/v2/queryBuilder.ts @@ -38,11 +38,15 @@ async function findKeys( const query = `from(bucket: "${bucket}") |> range(start: -${SEARCH_DURATION})${tagFilters} - |> drop(columns: ["_time", "_start", "_stop", "_value"]) |> keys() |> group() |> distinct() |> keep(columns: ["_value"])${searchFilter}${previousKeyFilter} + |> filter(fn: (r) => + r._value != "_time" or + r._value != "_start" or + r._value != "_stop" or + r._value != "_value") |> sort() |> limit(n: ${LIMIT})`