Closed boriskozak closed 7 years ago
quick update:
I was able to get around this issue by hard coding a short prefix length by changing
case Some(prefixMap) if (name.length <= prefixMap.maxPrefixLength) =>
to
case Some(prefixMap) if (name.length <= 3) =>
Still wondering if there's a better way to go about it
Another update: I had to roll by my fix above because it caused serious performance degradation.
Any update from the Twofishes team?
I missed your last comment so I thought this was fixed, my apologies. I can pass this along to them for you - although it may not get a response until after the holiday season.
As of October 2015, we include ADMIN1 names in the prefix index (see https://github.com/foursquare/twofishes/commit/8849521e1c2fbec435db6b14b86d0549845cac32). The index on demo.twofishes.net is older than that, though.
Rather than have the full name index search kick in at 3 characters, which, as you found, will cause perf degradation, I'd suggest you rebuild an index with the latest code.
When performing an autocomplete lookup for a state name < 6 characters, twofishes can't seem to find any results. I believe this may be because the lookup is done in the prefix index.
Here's an example:
Autocomplete search for Ohio with WoeRestrict 8 (no results)
Autocomplete search for Nebraska with WoeRestrict 8 (returns results as expected)