How could I manage a full text search in the whole database like LOCATE but in all fields?
Regards
Otto
Otto wrote:How could I manage a full text search in the whole database like LOCATE but in all fields?
Regards
Otto
#INCLUDE "Fivewin.ch"
#include "dbinfo.ch"
//REQUEST RMDBFCDX
REQUEST DBFCDX
//REQUEST BMDBFCDX
PROCEDURE Main()
FIELD FIRST, LAST, STREET, CITY
LOCAL n, hs
rddSetDefault( "DBFCDX" )
// rddSetDefault( "BMDBFCDX" )
// if ascan( rddList(1), "RMDBFCDX" ) != 0
// rddSetDefault( "RMDBFCDX" )
// endif
// ? RddSetDefault ()
use test
hs := HS_INDEX( "test", "FIRST+LAST+STREET+CITY", 2, 0, , .T., 3 )
/* Look for all records which have 'SHERMAN' string inside */
HS_SET( hs, "SHERMAN" )
while ( n := HS_NEXT( hs ) ) > 0
dbgoto( n )
if HS_VERIFY( hs ) > 0
? rtrim( FIRST+LAST+STREET+CITY )
endif
enddo
// wait
/* Does RDD support Record Map Filters? */
// if dbinfo( DBI_RM_SUPPORTED )
/* if yest then let set filter for all records with 'SHERMAN'
word and look at them in browser */
HS_FILTER( hs, "SHERMAN" )
DbSetFilter( {|| "SHERMAN"}, "SHERMAN" )
dbgotop()
browse()
// endif
HS_CLOSE( hs )
CLOSE ALL
QUIT
RETURN
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 107 guests