absurd-sql icon indicating copy to clipboard operation
absurd-sql copied to clipboard

How to add extensions? (fts4 and spellfix1)

Open lassebomh opened this issue 3 years ago • 2 comments

I am trying to create a fuzzy full-text search for a website and I'm quite lost as to how one would add extensions into absurd-sql.

The extensions are fts4 and spellfix1.

Any solutions?

lassebomh avatar Oct 02 '21 19:10 lassebomh

What I did:

  1. Cloned https://github.com/jlongster/sql.js
  2. https://github.com/jlongster/sql.js/blob/master/Makefile#L20
  3. Compiled it, and uploaded it to my npm

Here is the commit example where I enabled FTS5 https://github.com/quolpr/sql.js/commit/343e35ddb47716c3a21f5e9a027ca2831d5d4b47

Then in package.json instead of @jlongster/sql.js you need to put your own package name(like @lassebomh/sql.js)

Also check how to compile — https://github.com/sql-js/sql.js/blob/master/CONTRIBUTING.md#host-based-configuration-not-recommended

quolpr avatar Oct 03 '21 11:10 quolpr

Fwiw FTS4 is already enabled and available (enabling fts3 enables fts4): https://github.com/jlongster/sql.js/blob/master/Makefile#L24

samueljseay avatar Feb 14 '22 00:02 samueljseay