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.
Thanks!
The text was updated successfully, but these errors were encountered:
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" andcriterion.slice(-1)
is "*", then instead of checking thatevent_tags
contain a pair of[filterName[1], criterion]
, we should check thatevent_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.Thanks!
The text was updated successfully, but these errors were encountered: