Hi,
I am trying to add a new analyzer for Chinese,and I found the
code below in the "org.apache.nutch.indexer.Indexer"
public void write(WritableComparable key, Writable value)
throws IOException { // unwrap & index doc
Document doc = (Document)((ObjectWritable)value).get();
NutchAnalyzer analyzer = factory.get(doc.get("lang"));
if (LOG.isInfoEnabled()) {
LOG.info(" Indexing [" + doc.getField("url").stringValue() + "]" +
" with analyzer " + analyzer +
" (" + doc.get("lang") + ")");
}
writer.addDocument(doc, analyzer);
}
The question of mine is:
For doc.get("lang"). Where and how can I set the "lang" property for
the doc ? I also find the
http://wiki.apache.org/nutch/MultiLingualSupport from wiki,but I still
have troubles to solve the problem quickly. Any one here can give me
some help? Any hint is welcome, Thanks!!!
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nutch-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nutch-general