That little class wouldn't be too hard to convert to perl, although I don't
have a perl installation handy to convert it myself... Maybe if you or
someone you work with is familiar with perl you could convert it... Or
maybe you could contact the original author (his email address is in the
source listing) and ask him for help.
> I've successufully installed FT on a SQL Server 2000 used to manage images
> database.
[quoted text clipped - 11 lines]
>
> Fabio
hi, Fabio,
about a year ago i re-wrote our website's fulltext search and had very
similar questions. seems to me it would be a great open source
(mini-)project: doesn't need to be very big, but still takes more than half
an hour.
one question, the first replier to your question talked about perl, but i
didn't find any mention of perl in your question. what language are you
implementing in?
i implemented in C#. not sure whether my result is of much use to you, but i
can sketch how i proceeded. i basically support quotes, AND, OR, NEAR, and
NOT (which i promote to "AND NOT" if it isn't already written that way). i
eliminate naked (unquoted) noise words, and i eliminate a quoted chunk if it
contains only noise words. if 2 terms appear without an operator between
them, i treat them as ANDed -- which to me is what "net intuition" expects.
my Contains "getter" (C# term) begins as follows to give you an idea.
cheers,
Tim
/// <summary>
/// for many reasons it would be grand to support a real search grammar
(last and perhaps least because we could convert search terms to canonical
form for tagging)
/// but we don't yet (and our indexing has other problems such as not
allowing hyphens in words (thus we can't find wal-mart and g-8-gipfel)
/// so here is our poor man's quasi-grammar
/// </summary>
static Regex reBinarySearchOperators = new Regex(@"^(AND|OR|NEAR)$",
RegexOptions.IgnoreCase);
static Regex reUnarySearchOperators = new Regex(@"^(NOT)$",
RegexOptions.IgnoreCase);
public string Contains {
get {
if (IsEmpty) {
> I've successufully installed FT on a SQL Server 2000 used to manage images
> database.
[quoted text clipped - 11 lines]
>
> Fabio
Fabio Gava - 13 Jun 2007 13:08 GMT
> hi, Fabio,
>
[quoted text clipped - 6 lines]
> but i didn't find any mention of perl in your question. what language
> are you implementing in?
I'm using PHP5 for the website, but I would like to use the same function
also for administration software, written in Delphi7. This is the reason why
I was looking for a solution implemented directly on database side. With
SQL2005 you can declare external stored function using win DLL (this was
true also on SQL2000) and any CLR language.
This was the solution I got from the author of the function linked in my
first message.
I'm planning of testing this way in the next couple of days, otherwise we
are planning of translating that C# code in Delpy to create a DLL.
> i implemented in C#. not sure whether my result is of much use to
> you, but i can sketch how i proceeded.
It's exactly what I'm planning to test: use the C# code as an external
stored procedure. Did you already try this approach?
Many thanks.
-fabio
tbh - 13 Jun 2007 13:53 GMT
hi, Fabio,
>> i implemented in C#. not sure whether my result is of much use to
>> you, but i can sketch how i proceeded.
> It's exactly what I'm planning to test: use the C# code as an external
> stored procedure. Did you already try this approach?
no, that's an interesting idea, though. we are fairly flexible about what
logic we put in DLLs, Stored Procedures, User Defined Functions, Triggers,
and "application code", but we have not yet called home-grown DLL code in
the database, though we've heard about it.
good luck with your approach!
cheers, Tim
Mike C# - 13 Jun 2007 20:07 GMT
> one question, the first replier to your question talked about perl, but i
> didn't find any mention of perl in your question. what language are you
> implementing in?
The poster specifically said they don't know anything about .NET. That
implies that the programmer did not know how to program VB, C#, or other
.NET languages (the sample the OP linked to was in C#). Thus the suggestion
to convert it to Perl (or some other language the OP, or someone in his
company *does* know).