You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by Matze <ma...@dermatzeimnetz.de> on 2006/10/12 17:22:44 UTC
getMetaDescription();
Hello list,
I make some progress in showing the meta description, but there are still
some questions.
So far I tried to copy the getTitle() function. Therefore I wrote
MoreIndexingFilter.java
private Document addDesc(Document doc, ParseData data, String url) {
String description = data.getDescription();
if (description != null) {
doc.add(new Field("description", description, Field.Store.YES,
Field.Index.UN_TOKENIZED));
}
return doc;
}
Ok, so know how to add the getDescription()?
Maybe in ParseData.java? No, I guess not.
May be in HtmlParser.java? Yes maybe, but the Title of a document comes from
the function utils.getTitle(sb, root).
So do I at last have to patch DOMContentUtils or is there a shorter way?
Please help
Your Matthias