Currently in Discover we use a few different methods of checking if a query is text based (ES|QL):
getRawRecordType(query) === RecordRawType.PLAIN
isTextBasedQuery(query)
isOfAggregateQueryType(query)
...
We also use different variable names for the result which is confusing:
isTextBased
isPlainRecord
...
We should align on a single method of checking for text based / ES|QL queries and use consistent naming. Possibly something including ES|QL for clarity, along these lines: const isEsqlQuery = isEsqlQueryType(query).
Currently in Discover we use a few different methods of checking if a query is text based (ES|QL):
getRawRecordType(query) === RecordRawType.PLAIN
isTextBasedQuery(query)
isOfAggregateQueryType(query)
We also use different variable names for the result which is confusing:
isTextBased
isPlainRecord
We should align on a single method of checking for text based / ES|QL queries and use consistent naming. Possibly something including ES|QL for clarity, along these lines:
const isEsqlQuery = isEsqlQueryType(query)
.