Skip to content

Commit

Permalink
Merge pull request #5 from parabible/task/bugfixes
Browse files Browse the repository at this point in the history
Task/bugfixes
  • Loading branch information
jcuenod authored Jul 9, 2024
2 parents 7949d44 + 9bf129f commit 62e007e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/helpers/termSearchQueryBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const treeNode = (tnt: keyof typeof mapTreeNodeTypes) =>
? mapTreeNodeTypes[tnt]
: "parallel_id"

const toNormalizedKVPairs = (obj: any) =>
const toNormalizedKVPairs = (obj: {[key: string]: string}) =>
Object.keys(obj).map(k => ({ key: k, value: obj[k].normalize("NFC") }))

const featureToWhere = ({ key, value }: { key: string; value: string }) =>
Expand Down Expand Up @@ -77,7 +77,7 @@ const getTermSearchQuery = ({
HAVING
${treeNode(treeNodeType)} > 0
AND ${searchTerms.map(searchTermToHavingLength).join("\n\t\t\tAND ")}
${parallelIdQuery ? `AND parallel_id IN (${parallelIdQuery})` : ""}
${parallelIdQuery ? `AND arrayJoin(parallelIdSet) IN (${parallelIdQuery})` : ""}
) t
LEFT JOIN ordering_index
ON ordering_index.parallel_id = t.lowestParallelId
Expand Down
2 changes: 1 addition & 1 deletion types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type WordArray = {
leader?: string
text: string
trailer?: string
temp?: string
temp?: "warm" | "hot" | ""
}[]

type ClickhouseResponse<T> = {
Expand Down

0 comments on commit 62e007e

Please sign in to comment.