Open YassineALLAL opened 2 years ago
The twofishes prefix index doesn't seem to be correctly built causing the autocomplete to not work untill 6 characters.
r => bestWoeTypes.contains(r.woeTypeOrThrow) never matches because r.woeTypeOrThrow is an enum while bestWoeTypes is a list of integers (enum ordinals) https://github.com/foursquare/fsqio/blob/f5a5699c18babaa6810de84bcc6dd1522bcfe259/src/jvm/io/fsq/twofishes/indexer/output/PrefixIndexer.scala#L122
r => bestWoeTypes.contains(r.woeTypeOrThrow)
r.woeTypeOrThrow
bestWoeTypes
A fix would be to remove the map(_.getValue) mapping and keep the enum type. https://github.com/foursquare/fsqio/blob/f5a5699c18babaa6810de84bcc6dd1522bcfe259/src/jvm/io/fsq/twofishes/indexer/output/PrefixIndexer.scala#L103
map(_.getValue)
The twofishes prefix index doesn't seem to be correctly built causing the autocomplete to not work untill 6 characters.
r => bestWoeTypes.contains(r.woeTypeOrThrow)
never matches becauser.woeTypeOrThrow
is an enum whilebestWoeTypes
is a list of integers (enum ordinals) https://github.com/foursquare/fsqio/blob/f5a5699c18babaa6810de84bcc6dd1522bcfe259/src/jvm/io/fsq/twofishes/indexer/output/PrefixIndexer.scala#L122A fix would be to remove the
map(_.getValue)
mapping and keep the enum type. https://github.com/foursquare/fsqio/blob/f5a5699c18babaa6810de84bcc6dd1522bcfe259/src/jvm/io/fsq/twofishes/indexer/output/PrefixIndexer.scala#L103