I'm trying to customize a Tipue search script.

Currently the script is searching the entire HTML file (including metadata) and triggering false positives on the search results. I'd like to eliminate the metadata from the critera or only allow the script to search a specific DIV (i.e. #pagewrap).

Here is a link to the current script: http://www.worldonecommunications.com/ndrill/tipuesearch/tipuesearch.js (Lines 37-77)

The pages are being indexed in a separate file, but I think the problem lies in the file listed above.

有帮助吗?

解决方案

For others who are interested: The developer finally updated the search script to target only a specific DIV. The updated code can be downloaded from their site: http://www.tipue.com/search/

其他提示

I think you need to change these lines:

var t_1 = html.toLowerCase().indexOf('<title>');
var t_2 = html.toLowerCase().indexOf('</title>', t_1 + 7);
...
var t_1 = html.toLowerCase().indexOf('<meta name="description"');
var t_2 = html.toLowerCase().indexOf('"', t_1 + 34);

I'am also searching a way how to modify this engine to out results from page body.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top