hi,

not sure if this is what you are looking for;

String indexLocation = conf.get("searcher.dir");
IndexReader reader = IndexReader.open(indexLocation+"/index");

int num = reader.numDocs();
for ( int i = 0; i < num; i++)
{
  Document doc = reader.document(i);
  String content =  doc.getField("content").stringValue();
  ..
}

> I have created an Index of some webpages using nutch. Now, I need to
> search this index using Lucene API. Even though I am able to do the
> search on the basis of say, url, i am not able to access the content
> that is associated with the webpages, since nutch creates its index in
> a different way. Could anyone help me out with how to retrieve the
> content?
>


Reply via email to