feat: Set enable_full_text_index=1 when available (#1946)

This commit is contained in:
Drew Davis 2026-03-20 10:14:21 -04:00 committed by GitHub
parent 243e3baa26
commit e18f88c8b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
"@hyperdx/common-utils": patch
---
feat: Set enable_full_text_index=1 when available

View file

@ -555,6 +555,9 @@ export abstract class BaseClickhouseClient {
// If value is 0, then skip indicies only used on AND queries
applySettingIfAvailable('use_skip_indexes_for_disjunctions', '1');
// Enables full-text (inverted index) search.
applySettingIfAvailable('enable_full_text_index', '1');
return {
...defaultSettings,
...clickhouse_settings,
@ -814,6 +817,7 @@ export function chSqlToAliasMap(
const { sqlWithReplacements, replacements: jsonReplacementsToExpressions } =
replaceJsonExpressions(sqlWithoutSettingsClause);
const parser = new SQLParser.Parser();
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- astify returns union type
const ast = parser.astify(sqlWithReplacements, {
database: 'Postgresql',