Hello, What is the best way to do a full text search in various fields of a DBF file? Seems that RDD Six for Clipper has HS_Index() / HS_Filter() and so that are really fast but what is best option in Harbour since AFAIK DBRMAP is not available? Below an example in the xHarbour Language Reference Guide that may be a good option but it is not "that" fast when the database is big. Any ideas of how to do it in a optimized way it with DBF file, maybe including many fields and a memo field, too? By the way... I do not have any experience with SQL but I belive this operation could be done easily with RDBMS. It is a good idea to bring an exemple of it too, if possible, just to compare a bit the available options. I am thinking about using SQLite to enter in the SQL world because it seems to be easier to intall and configure what is other situation for PostgreSQL and others. As they say in their website:
SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. SQLite is the most widely deployed SQL database engine in the world. The source code for SQLite is in the public domain Seems very interesting. Does anyone know if this SQLite could be used with Harbour for a serious application (by serious I mean, trustyworth and with enough resources to do the common commercial application's transactions and operations). Unfortunatelly DBF seems to be easy to corrupt due to hardware failures / power source / crashs / cables, etc.. and in real life applications it is not admissible to loose or corrupt data. Does anyone uses SQLite with Harbour? Any comments are welcome. Thanks for any help. Qatan <CODE> // The example uses two wildcard search strings to show // possible search results of OrdWildSeek() PROCEDURE Main LOCAL aCust := {} USE Customer INDEX ON Upper(LastName) TO Cust01 DO WHILE OrdWildSeek( "*MAN?", .T. ) AAdd( aCust, FIELD->Lastname ) ENDDO AEval( aCust, {|c| QOut(c) } ) // Found records: // Dormann // Feldman GO TOP aCust := {} DO WHILE OrdWildSeek( "*EL*", .T. ) AAdd( aCust, FIELD->Lastname ) ENDDO AEval( aCust, {|c| QOut(c) } ) // Found records: // Feldman // Hellstrom // Keller // Reichel USE RETURN <ENDCODE> _______________________________________________ Harbour-users mailing list (attachment size limit: 40KB) Harbour-users@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour-users