FILTER command help
Posted: Tue Jul 10, 2007 12:44 pm
I've got the whole Bible in a text field, 31103 lines, in the format:
1•1•1•1•#In#the#beginning#God#created#the#heavens#and#
2•1•1•2•#And#the#earth#was#waste#and#void#and#darkness#
3•1•1•3•#And#God#said#Let#there#be#light#and#there#
I put the field into a variable (rawv) then FILTER it for the search term, eg:
FILTER rawv with ("*#" & cd fld "srchterm" & "#*)
But I don't get any results after about 2/3rds of the data - the just don't get put into the filtered result. I thought this might be a limit on the memory size of a variable, but this proved wrong as I can PUT RAWV INTO CD FLD "RESULT" and get an exact copy of the original field, which wouldn't be the case if the rawv variable had a size limit.
Finally, I split the routine into 3 parts, doing the FILTER for lines 1 to 10000, then 10001 to 20000, then 20001 to 31103. It works fine when I do that, so that leads me to believe that there is a limit on the number of lines that the FILTER command can handle.
Can anyone confirm that there is such a limit for the FILTER command?
Obviously with that many records, I should be using an SQL database and doing an SQL SELECT but Rev returns the results instantly using the FILTER command, with the above workaround. And I'm a bit of a newbie when it comes to using an SQL database with Rev, every time I try to use one locally I get a 'could not connect' error. Can someone post me a few lines showing how to create one, write data to one, etc? Much appreciated.
1•1•1•1•#In#the#beginning#God#created#the#heavens#and#
2•1•1•2•#And#the#earth#was#waste#and#void#and#darkness#
3•1•1•3•#And#God#said#Let#there#be#light#and#there#
I put the field into a variable (rawv) then FILTER it for the search term, eg:
FILTER rawv with ("*#" & cd fld "srchterm" & "#*)
But I don't get any results after about 2/3rds of the data - the just don't get put into the filtered result. I thought this might be a limit on the memory size of a variable, but this proved wrong as I can PUT RAWV INTO CD FLD "RESULT" and get an exact copy of the original field, which wouldn't be the case if the rawv variable had a size limit.
Finally, I split the routine into 3 parts, doing the FILTER for lines 1 to 10000, then 10001 to 20000, then 20001 to 31103. It works fine when I do that, so that leads me to believe that there is a limit on the number of lines that the FILTER command can handle.
Can anyone confirm that there is such a limit for the FILTER command?
Obviously with that many records, I should be using an SQL database and doing an SQL SELECT but Rev returns the results instantly using the FILTER command, with the above workaround. And I'm a bit of a newbie when it comes to using an SQL database with Rev, every time I try to use one locally I get a 'could not connect' error. Can someone post me a few lines showing how to create one, write data to one, etc? Much appreciated.