First attempt at native database FTS for sqlite

"John P. Rouillard" <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <[email protected]>
Hi all:

Tom Ekberg's issue made me take another look at using the native FTS
modes in postgresql and sqlite.

Since I run sqlite for my active and test databases, I started there.
After about 4 hours of work I have a working sqlite FTS implementation.

I can do things like:

    "responding to rt" OR chromi*

and get the correct values.

It looks like term, prefix, phrase, boolean (AND OR NOT), and NEAR all
work.  I did come across one unexpected issue due to the syntax of the
query language. A search for:

  "responding to rt" callback-mechanism

results in "Error: no such column: mechanism" because '-mechanism' is
interpreted as a column filter exclusion.

However:

  "responding to rt" "callback-mechanism"

does work as expected.

I hope this will permit:

  * implementing postgresql FTS
  * pave the way to using the Whoosh and Xapian query languages.

Does anybody want to experiment with it? You will need to manually add
the new fts table. After you install the patch everything else should
work.

Have a great weekend.
--
				-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.