Hi,
I was browsing through aspseek's cvs and I am wondering about
"OnlineGeo on" option. If I understand correctly, countries from text file are
inserted into countries table, geo then checks periodicaly for ip ranges
and country name of existing columns in the table. Is it possible to make
automatic check and insert for ip not found in countries table when
running index? This could be done only if there is no Allow match up to
AllowCountries.
There is a bug in
void CRanks::LoadRanks(FILE* f)
In statement
*r++ = (WORD)(log(buf[i] * 10) * 2000);
buf[i] is sometimes zero, which crashes on alpha. Maybe you should replace
it with
if(buf[i]==0)
*r++=(WORD)0;
else
*r++ = (WORD)(log(buf[i] * 10) * 2000);
I have added function AddAsciiForms to search also for from converted to
7bit, and I call after "FindForms(elem, forms);" in qparser.cpp. For the
moment it is a bit stupid and it work only for part of latin2. For general
use, there should be a character translation table, for example in
charsets conf subdir.
Here is the source:
--------------
void AddAsciiForms(hash_set<CSWord>& forms) {
// Done only for part of latin2
const int flen=10;
const unsigned char from[flen] =
{0xC8,0xE8,0xA9,0xB9,0xAE,0xBE,0xD0,0xF0,0xC6,0xE6};
const unsigned char to[flen] =
{'C','c','S','s','Z','z','D','d','C','c'};
for(hash_set<CSWord>::iterator it=forms.begin();it!=forms.end();it++) {
char str[MAX_WORD_LEN+1];
strncpy(str,it->c_str(),MAX_WORD_LEN+1);
unsigned char *pos=(unsigned char*)str;
while(*pos) {
for(int i=0;i<flen;i++) {
if(*pos==from[i]) {
*pos=to[i];
}
}
pos++;
}
if(strcmp(str,it->c_str()))
forms.insert(str); // this call extends hash_set -> duplicate
// checking
}
}
------------
Best regards,
Andrej Filipcic