You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by Mat Fix <sp...@yahoo.fr> on 2006/10/17 09:24:14 UTC
My search keeps on looping
Hi all,
I have written a plugin, or rather I am trying to, to search some pre-saved words. The problem is that it never searches as it keeps on looping during the NutchBean configuration. Here is my code:
public class MySearchOLD extends BasicQueryFilter{
{
final Configuration conf;
try {
conf = NutchConfiguration.create();
Query query = new Query();
query.addRequiredTerm("myTerm");
Path path = new Path("C:\\cygwin\\nutch-0.8.1\\crawled\\");
System.out.println("2222222");
NutchBean nutchBean = new NutchBean(conf, path);
//Never go further down than here, as it never displays 33333
System.out.println("33333");
Hits hits = nutchBean.search(query, 10);
IndexSearcher searcher = new IndexSearcher(path, conf);
HitDetails[] details = searcher.getDetails(hits.getHits(0, hits.getLength()));
for (int i = 0; i < details.length; i++) {
HitDetails curDetail = details[i];
System.out.println(curDetail);
}
}
catch (IOException e) {
e.printStackTrace();
}
}
}
Can someone tell me where I am wrong?
Thanks a lot!
Mat
___________________________________________________________________________
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Demandez à ceux qui savent sur Yahoo! Questions/Réponses
http://fr.answers.yahoo.com