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
Simply searching for dog currently does not include the actual word for dog (犬) because its glossary entry contains some text between brackets in its actual gloss entry. dog (Canis (lupus) familiaris) I could simply throw in a wildcard to fix this however that would make the queries turn into seconds instead of milliseconds. Maybe an index could fix this?
The text was updated successfully, but these errors were encountered:
Something like that is possible: name >= 'dog' AND name < 'doh'.
In general tho, if Postgresql is able to tell that a LIKE doesn't start with a wildcard, it'll be able without an issue to transform it to a BETWEEN-like clause, so you don't lose that much performance.
Of course if it's parameterized, it might be an issue.
I've currently fixed this with the following index (on the dev branch) CREATE INDEX IF NOT EXISTS trgm_gloss_index ON gloss (regexp_replace(txt, '\s\(.*\)', ''));
it's performant and simply removes everything between brackets, not sure if it's the optimal solution but it does work.
Simply searching for dog currently does not include the actual word for dog (犬) because its glossary entry contains some text between brackets in its actual gloss entry.
dog (Canis (lupus) familiaris)
I could simply throw in a wildcard to fix this however that would make the queries turn into seconds instead of milliseconds. Maybe an index could fix this?The text was updated successfully, but these errors were encountered: