package db;
import tool.catchword;
import tool.readfile;
public class serach {
String str;
String file;
int s,sx,datanumber;
String[] data=new String[50000];
String[] link=new String[50000];
String[] adr=new String[50000];
String[] paper=new String[50000];
String[] subvalue=new String[50000];
public String[] value=new String[50000];
public int number;
int subnumber,tx;
public void makedata(String db,String word){
index sub2=new index();
str=sub2.makedata(word);
file=db+"/adr/"+str+".txt";
readfile sub=new readfile();
sub.makedata(file,"UTF-8");
data=sub.data;
datanumber=sub.datanumber;
for(s=1;s<datanumber+1;s++){
catchword sub4=new catchword();
adr[s]=sub4.makedata(data[s],"key");
link[s]=sub4.makedata(data[s],"page");
}
sx=0;
for(s=1;s<datanumber+1;s++){
if(word.equals(adr[s]))sx=sx+1;
if(word.equals(adr[s]))paper[sx]=link[s];
}
number=sx;
tx=0;
for(s=1;s<number+1;s++){
file=db+"/part/"+paper[s]+".txt";
catchdata sub5=new catchdata();
sub5.makedata(file, word);
subvalue=sub5.subvalue;
subnumber=sub5.subnumber;
for(sx=1;sx<subnumber+1;sx++){
tx=tx+1;
value[tx]=subvalue[sx];
}
}
number=tx;
}
}
最終更新:2013年08月01日 02:40