Hi Simon,
That is unfortunate, if it is true that there's no way to accomplish this
with SqLite. To do just plain matching I can use an unordered hash map, so I
wouldn't need a database for that. The trouble with a string distance
function is that I can't really process the entire dataset with it. SqLite
technically has all the features I'm after, I just don't want it to
necessarily match all the words in a query. If I can get it to match all as
well as some, that would be enough. I could then do distancing on a
considerably smaller dataset which would be the result of the broader SqLite
search.
So I guess my main question is, is there absolutely no way to match a subset
of the words in a query?
Kind regards,
Philip Bennefall
----- Original Message -----
From: "Simon Slavin" <slav...@bigfraud.org>
To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org>
Sent: Thursday, June 14, 2012 7:24 PM
Subject: Re: [sqlite] Full text search without full phrase matches
On 14 Jun 2012, at 6:12pm, Philip Bennefall <phi...@blastbay.com> wrote:
The trouble I have is that in my query, all the keywords don't necessarily
have to be present in order for a successful match to be made. SqLite's
fts only seems to match if all the keywords are present, which I don't
require.
You will have to do some of this in your own programming. In fact you may
end up doing all of it in your own programming and using the FTS feature
only to match single words and single word-fragments.
The usual way to do this is to define a 'distance' metric for comparing two
strings and finding how far apart they are. A score of 0 means they match
exactly. Numbers bigger than a certain amount don't matter: anything bigger
than, say, 100 means they're not at all alike.
Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users