You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by qi wu <ch...@gmail.com> on 2007/10/18 11:58:29 UTC
Problme of modifying generated index..
Hi,
I am trying to modify the content of certain field in generated index , and the fields with "Field.Store.NO" like archor,content,site are lost, the source code is listed blow:
IndexReader ir = IndexReader.open(indexDir);
IndexWriter writer=new IndexWriter("C:\\nutch9Ship\\lv321DB\\index01", analyzer ,
true);
.......
Document doc=ir.document(j);
doc.removeField("time");
doc.add(new Field("time",getDate(cont.toString()),Field.Store.YES,Field.Index.UN_TOKENIZED));
System.out.println(doc.getFields().size());
writer.addDocument(doc);
.......
The filed like archor,content,site can be found through Luke for original index,but can't to find in the new generated index through Luke..Anyone could give me a hint on this? I am also looking into this
Thanks
-Qi