RobinL / fuzzymatcher

Record linking package that fuzzy matches two Python pandas dataframes using sqlite3 fts4
MIT License
281 stars 60 forks source link

fts5 considers unrecognized column options to be errors #54

Open EvilConsultant opened 4 years ago

EvilConsultant commented 4 years ago

First, thank you, you just saved me a ton of time.

I recently installed and tried fuzzymatcher. I encountered an error running the code in the article https://pbpython.com/record-linking.html. At first, I was getting a OperationalError: no such module: fts4, but following some advice in another issue, I replaced all my SQLite dlls with the latest.

However, I then began getting a Unrecognized column option error. After reading this - https://www.sqlite.org/fts5.html - and seeing it mention FTS5 considers column options to be errors, I suspected (I haven't confirmed) that the latest SQLite windows dll included FTS5, so in data_getter_sqlite.py I changed:

USING fts4({} TEXT, _concat_all TEXT, _concat_all_alternatives TEXT);"""format(matcher.right_id_col)

to

USING fts5({}, _concat_all, _concat_all_alternatives);""".format(matcher.right_id_col)

and it worked for me.

I suspect it is related to my fresh install of everything on windows? Sharing in case it helps others.

pballent commented 3 years ago

@EvilConsultant I just wanted to chime in that this fixed saved me from having to switch away from fuzzymatcher. Thank you!