Re: [sqlite] Problem loading extension in Delphi (FTS2)

2007-08-10 Thread Henrik Ræder
   Hi Ralf

   Thanks for the tip.

   I checked it out, and it's a bit complex, but looks very clean. I'll
probably update to that component set at a later date.

   -Henrik

2007/8/10, Ralf Junker <[EMAIL PROTECTED]>:
>
> Hello Henrik Ræder,
>
> >I'm trying to load the FTS2 extension in Delphi, using the Aducom
> >components. Am really close, but still stuck, and thinking it's a problem
> >with the parameter to sqlite3_enable_load_extension().
>
> DISQLite3 (http://www.yunqa.de/delphi/sqlite3/) does not expose such
> problems.
>
> Look at the full text search demo project which incorporates both FTS1 and
> FTS2 into a single *.exe application, with _no_ DLLs or external files
> needed.
>
> The new customizable tokenizer interface will be demonstrated by a
> Unicode-aware Pascal tokenizer with the upcoming version of DISQLite3 as
> soon as the FTS vacuum fix is official released.
>
> Ralf
>
>
>
> -
> To unsubscribe, send email to [EMAIL PROTECTED]
>
> -----
>
>


-- 
Henrik Ræder Clausen
CD-rom editor
Komputer for alle

Jidoka Development   Hougårdsvej 29   8220 Brabrand   DenmarkTlf +45
6186 0442


[sqlite] Problem loading extension in Delphi (FTS2)

2007-08-10 Thread Henrik Ræder
   Hi

   I'm trying to load the FTS2 extension in Delphi, using the Aducom
components. Am really close, but still stuck, and thinking it's a problem
with the parameter to sqlite3_enable_load_extension().

In declaration:
procedure sqlite3_enable_load_extension(db: string; onoff: integer);
stdcall; far; external 'sqlite3.dll';

In code:
sqlite3_enable_load_extension(Bladbase.Database, 1);
Result2 := Bladbase.SQLite3_ExecSQL('SELECT load_extension(''libfts2.dll
'');');

   I get an exception "Not authorized" on the SQL statement, inferring that
the enable_load_extension() function failed.

   This is possibly due to it wanting a real handle to the database, which
the Aducom components don't provide in a visible manner.

   Any ideas?

   -Henrik


Re: [sqlite] Soft search in database

2007-03-06 Thread Henrik Ræder

  Hi Martin

2007/3/6, Martin Pfeifle <[EMAIL PROTECTED]>:


Unfortunately, the fts module of sqlite does not support "fuzzy text
search = google search".



  Yes, I realize this. I'll have to add some additional logic to
achieve this. Looks doable.

Such a module should not only support range queries, e.g. give me all

strings which have a distance smaller than eps to my query string, but also
ranked nearest neighbor queries.

We also urgently need such a module, and think about implementing it on
our own. I would appreciate if efforts could be synchronized.



  While it would be cool to work on solving the general case, I'm
afraid the time pressure here doesn't really permit me doing anything
major in that direction. We have a controlled environment for our
searches and will be able to solve the job sufficiently well by
simpler means.

  Good luck!

  -Henrik


Re: [sqlite] Soft search in database

2007-03-06 Thread Henrik Ræder

  Hi

2007/3/6, Michael Schlenker <[EMAIL PROTECTED]>:


>   Now my boss, who has a wonderfully creative mind, asks me to implement
a
> full-text search function which is not the usual simplistic 'found' /
> 'not found', but more Google-style where a graded list of results is
> returned.
You have come to the right place.

Take a closer look at:
http://www.sqlite.org/cvstrac/wiki?p=FullTextIndex



  Thanks a bunch. These are good building blocks for what I want to do.

  -H


[sqlite] Soft search in database

2007-03-06 Thread Henrik Ræder

  Hi

  (First post - hope it's an appropriate place)

  I've been implementing a database of a few MB of text (indexing
magazines) in SQLite, and so far have found it to work really well.

  Now my boss, who has a wonderfully creative mind, asks me to implement a
full-text search function which is not the usual simplistic 'found' /
'not found', but more Google-style where a graded list of results is returned.

  For example, in a search for "MP3 Player", results with the phrases next
to each other would get a high rating, as would records with a high
occurance of the keywords.

  This falls outside the usual scope of SQL, but would still seem a
relatively common problem to tackle.

  Any ideas (pointers) how to tackle this?

  Best regards

Henrik Ræder Clausen
CD-rom editor
Komputer for alle

Jidoka Development   Hougårdsvej 29   8220 Brabrand   DenmarkTlf +45
2611 5842