hi !
i begin to play with js
i try to search in message base, but search one to one is poor performance do you have another code that search in the base with more speed?
maybe some method more optimized?
a global menssage base index?
a gift from google? :)
for (grp in msg_area.grp_list) {
for (sub in msg_area.grp_list[grp].sub_list) {
msg = new MsgBase(msg_area.grp_list[grp].sub_list[sub].code);
if (msg.open()) {
for (i=0;i< msg.total_msgs;i++) {
mensaje = msg.get_msg_header(true,i);
if (mensaje != null) {
if (mensaje.subject.indexOf("hola") >= 0) {
writeln(mensaje.from);
writeln("<br />");
writeln(mensaje.subject);
writeln("<br />");
}
}
else
writeln ("error getting message");
}
msg.close();
}
else {
writeln ("Error al abrir la base de mensajes: " + msg_base.grp_list[grp].
}
}
}
Re: efficient searchsmy idea is search in to body of messages too(in future), to put it into a
By: Ragnarok to DOVE-Net.Sync_JavaScript on Fri Nov 25 2005 05:29 pm
msg.close();
}
else {
writeln ("Error al abrir la base de mensajes: " + msg_base.grp_list[grp].
}
}
}
Your script seems to just search the message subjects. This is slow?
digital man
Digital Man wrote:
Re: efficient searchs
By: Ragnarok to DOVE-Net.Sync_JavaScript on Fri Nov 25 2005 05:29 pm
msg.close();
}
else {
writeln ("Error al abrir la base de mensajes: " + msg_base.grp_list[grp].
}
}
}
Your script seems to just search the message subjects. This is slow?
digital manmy idea is search in to body of messages too(in future), to put it into a web page, but i think to this will be more slow
i can export the msgbase in timed events to mysql engine or make a cgi in c++ usign the msgbase api, but i dont know. i searching for ideas =?
Sysop: | Clippy |
---|---|
Location: | Houston, TX |
Users: | 4 |
Nodes: | 4 (0 / 4) |
Uptime: | 215:22:18 |
Calls: | 1 |
Files: | 11 |
Messages: | 38,209 |