fix: index k tag even if the value is not a number and count is less than 3

This commit is contained in:
P. Reis 2025-03-21 16:56:24 -03:00
parent fab34dbf5b
commit 4451aafadc

View file

@ -85,7 +85,7 @@ export class DittoPgStore extends NPostgres {
'a': ({ count }) => count < 15, 'a': ({ count }) => count < 15,
'd': ({ event, count }) => count === 0 && NKinds.parameterizedReplaceable(event.kind), 'd': ({ event, count }) => count === 0 && NKinds.parameterizedReplaceable(event.kind),
'e': DittoPgStore.eTagCondition, 'e': DittoPgStore.eTagCondition,
'k': ({ count, value }) => count === 0 && Number.isInteger(Number(value)), 'k': ({ count }) => count < 3,
'L': ({ event, count }) => event.kind === 1985 || count === 0, 'L': ({ event, count }) => event.kind === 1985 || count === 0,
'l': ({ event, count }) => event.kind === 1985 || count === 0, 'l': ({ event, count }) => event.kind === 1985 || count === 0,
'n': ({ count, value }) => count < 50 && value.length < 50, 'n': ({ count, value }) => count < 50 && value.length < 50,