Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 12 total
Thread Testing TextIndexing in EDBMgr
Thu, Jun 21 2012 2:58 AMPermanent Link

Kong Aw

I am new to ElevateDB.  I need to test the textindexing feature in EDBMgr to help me understand how things work.  How should I go about doing this - creating the external modules, where to put them, how do I install them, etc.

Thanks.
Thu, Jun 21 2012 3:54 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Kong


To simply test full text indexing you don't need any external modules you can just use ElevateDB's built in facilities. To set a text index just open EDBManager and add an index to a table setting its type to Text Index. You'll need to do this even if you want to customise text indexing.

If you want to customise the word generators etc you can have a look in the extensions newsgroup where I've posted the code I use for that purpose.

There was a really nice explanation of ElevateDB's full text indexing but I can't find it anymore - I've asked Tim where its gone and when he tells me I'll pass it on.

Roy Lambert [Team Elevate]
Thu, Jun 21 2012 4:11 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Kong


Found the description - I was looking in the wrong pdf to start with.

Either in the sql pdf help file search for 1.17 Text Indexing or on the on-line help built into EDBManager click index and enter text indexing as the search term. In either case you get a very well written explanation of how ElevateDB does full text indexing.


Roy Lambert [Team Elevate]
Thu, Jun 21 2012 10:19 AMPermanent Link

Kong Aw

Roy, thanks for your replies.  

I have read the write up in 1.17.  My problem are:
a)  How do I do this in EDBmgr?. Do I open a SQLwindow?  
b)  Where do I store the module file?  
c)  How do I debug the module codes?

Like I said, I am a newbie.

KK Aw

Thu, Jun 21 2012 10:31 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Kong


Do you need a custom word generator or textfilter or will the built in ones be acceptable for your initial testing?

Roy Lambert [Team Elevate]
Thu, Jun 21 2012 10:43 AMPermanent Link

Kong Aw

Roy,

I have generated a textfilter.dll using the template provided using codes that I have used in DBISAM 4.  

I have not looked at the word generator yet.  Right now, I am still trying to understand ElevateDB.

The features look like they are better managed, but I don't know how to manage them {g}.

KK Aw  
Thu, Jun 21 2012 11:36 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Kong


OK I think I'm with you now.

Its a long while back I hooked up my custom stuff so my memory may get it wrong but here goes.

What I did when I wrote my custom stuff was to develop a small testbed for it - a small app that could call the text filter & word generator outside of ElevateDB so I could easily check that what came out was what I thought should be coming out - in my case this was a form and I simply added the text filter / word generator units to is, dropped on a couple of TMemos 1 for input and 1 for output and called my routines on the contents of memo1. Its a LOT easier and faster than trying to do it through EDBManager although that is possible.

Once you've got your software into a state you're happy with you have to

1. register the external module with ElevateDB - CREATE MODULE
2. register the text filter
3. register the word generator


eg from the code that I used to migrate my DBISAM database

first of all at the session level

with EDBSession do begin
  Execute('DROP MIGRATOR "DBISAM4"');
  Execute('CREATE MODULE "nlhFunctions" ' + 'PATH ' + QuotedStr(Path + 'nlhFunctions.dll'));
  Execute('CREATE MODULE "PosExStripHTML" ' + 'PATH ' + QuotedStr(Path + 'PosExStripHTML.dll'));
  Execute('CREATE MODULE "wgLookupList" ' + 'PATH ' + QuotedStr(Path + 'wgLookupList.dll'));
  Execute('CREATE MODULE "StripRTF" ' + 'PATH ' + QuotedStr(Path + 'StripRTF.dll'));
  Execute('CREATE MODULE "wgPreFiltered" ' + 'PATH ' + QuotedStr(Path + 'wgPreFiltered.dll'));
  Execute('CREATE TEXT FILTER "RTFStripper" TYPE ''RTF'' MODULE "StripRTF"');
  Execute('CREATE TEXT FILTER "HTMLStripper" TYPE ''HTML'' MODULE "PosExStripHTML"');
  Execute('CREATE WORD GENERATOR "wgStandard" MODULE "wgPreFiltered"');
  Execute'CREATE WORD GENERATOR "wgLookupList" MODULE "wgLookupList"');
end;

You can type the commands in in EDBManager in an SQL window at the session level (you'll see Configuration on the status line)

Then at the table level you create the text indices - in EDBManager - open the session, open the database, open the list of tables, select the table and open the Indexes page - create a new index - select Text Index from the drop down list, in Columns add in the column you want, on the Text Index page set the Filter Type column - this should link back to your text filter if you have one, from the drop down list select the word generator you want and off you go.

In code it would be

CREATE TEXT INDEX "TxtInd"
ON "SomeTable"
("TxtFld" COLLATE "ANSI_CI")
INDEXED WORD LENGTH 30
FILTER TYPE COLUMN "Controller"
WORD GENERATOR "wgList"


You can debug your dll using EDBManager and Delphi - Tim's instructions

-----------------------------------------------------------------------------------------------------------
Open the DLL project in the IDE, set its output directory to the
configuration path, and then set the Run/Parameters so that the host
application is the EDB Manager.  That's it.  Once you run (F9) the project
and the DLL is loaded by the EDB Manager, you'll see any breakpoints enable,
and any exceptions will stop on the line of code that is causing the
exception.
-----------------------------------------------------------------------------------------------------------------

Roy Lambert [Team Elevate]

Sat, Jun 23 2012 7:04 AMPermanent Link

Kong Aw

Thanks Roy, I am getting the picture.

If I use codes, do I run it each time the user starst up the application?  Would that cause problems?

KK Aw
Sat, Jun 23 2012 8:57 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Kong

>If I use codes, do I run it each time the user starst up the application? Would that cause problems?

If I've interpreted that correctly the answer is: you don't run it - you register the module (your dll) with ElevateDB using CREATE MODULE and then ElevateDB will load it automatically when it starts. Its what allows us to have the same engine customisations running in our apps and EDBManager which we couldn't achieve with DBISAM and DBSys.

Roy Lambert [Team Elevate]
Sat, Jun 23 2012 10:54 AMPermanent Link

Kong Aw

Roy,

Looks like I will have to write a small database initialization program to create the databases and all the tables to ease my deployment.  Should be a good exercise to learn ElevateDB.

Thanks.
KK Aw
Page 1 of 2Next Page »
Jump to Page:  1 2
Image