Using fts3 on Windows

76 views
Skip to first unread message

guillermooo

unread,
Oct 12, 2011, 6:16:46 AM10/12/11
to python...@googlegroups.com
Hi,

I'm trying to use the full-text search extension on Windows. Do I need anything else other than the downloadable package from http://code.google.com/p/pysqlite/downloads/list? Specifically, do I need to compile the fts extension separately?

Regards,
Guillermo

Roger Binns

unread,
Oct 12, 2011, 10:46:16 AM10/12/11
to python...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/10/11 03:16, guillermooo wrote:
> I'm trying to use the full-text search extension on Windows.

Go ahead and try to create a FTS table:

CREATE VIRTUAL TABLE test USING fts3()

If the SQLite you are using has the FTS extension present then that will
succeed, else it will fail.

> Do I need anything else other than the downloadable package from
> http://code.google.com/p/pysqlite/downloads/list? Specifically, do I
> need to compile the fts extension separately?

Try it. I believe FTS is compiled in.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk6VqDgACgkQmOOfHg372QQa8ACgg8wGuj6UnZz9Pp9aTpZ4z1bY
/y8AoM5XjUOnfETVIgW4A4RYth3jULbZ
=Nesu
-----END PGP SIGNATURE-----

Gerhard Häring

unread,
Oct 12, 2011, 10:55:03 AM10/12/11
to python...@googlegroups.com
On Wed, Oct 12, 2011 at 4:46 PM, Roger Binns <rog...@rogerbinns.com> wrote:
[...]
Try it.  I believe FTS is compiled in.

Yes, it should just work, according to this:

"""
cmd = '%(CC)s -mno-cygwin %(OPT)s -mdll -DMODULE_NAME=\\"pysqlite2._sqlite\\" -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_FTS3=1 -I amalgamation -I %(INC)s -I . %(SRC)s -L %(CROSS_TOOLS)s/python%(VER)s/libs -lpython%(VER)s -o build/%(LIBDIR)s/pysqlite2/_sqlite.pyd' % vars
"""

The FTS3 and RTREE extensions should be available on Windows, just as anywhere else where pysqlite is build with "build_static". I have never actually used them, though.

-- Gerhard

guillermooo

unread,
Oct 12, 2011, 11:56:33 AM10/12/11
to python...@googlegroups.com
My bad, I was incorrectly importing the standard library build instead of doing "import pysqlite2.dbapi2 as sqlite". It works now. Thanks!
Reply all
Reply to author
Forward
0 new messages