You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A typical geohash filter will look for events in a given bounding box, which can be described by a list of geohash prefixes.
Following the discussion here, I think it would be useful if specifying a "*" at the end of a geohash will mean a search for all events with a geohash tag that contains the requested prefix.
I think the change should be somewhere here, but I'm not familiar with Knex. If filterName[1] is "g" and criterion.slice(-1) is "*", then instead of checking that event_tags contain a pair of [filterName[1], criterion], we should check that event_tags contain a pair with a first element of "g" and a second element that starts withcriterion.slice(0, -1).
A possible alternative is to assume that every geohash filter that has less than 9 characters is actually a "prefix filter", even if it doesn't end with "*".
Another crazy option is to index every geohash value with all of its prefixes (i.e. for and event containing ["g","dqcjqcpew"], also add to the database ["g","dqcjqcpe"],["g","dqcjqcp"],["g","dqcjqc"],["g","dqcjq"],["g","dqcj"],["g","dqc"],["g","dq"],["g","d"] - this is crazy but will make the queries simpler.
Opened #586 for this. Went with the * suffix - if a #g criterion ends with *, the SQL uses LIKE 'prefix%' and the in-memory matcher uses startsWith(prefix). Without * it's still exact match. Kept scoped to #g, other generic tags untouched.
Activity
kanishka0411 commentedon Apr 27, 2026
Opened #586 for this. Went with the * suffix - if a #g criterion ends with *, the SQL uses LIKE 'prefix%' and the in-memory matcher uses startsWith(prefix). Without * it's still exact match. Kept scoped to #g, other generic tags untouched.
cameri commentedon Apr 30, 2026
Thank you @kanishka0411 !