So I have every-time to provide a own DocumentFactory in case i wish to add custom meta data? Sorry for being confused.
public class MyDocumentFactory extends DocumentFactoryImpl {
public Document getDocument
(String seg, long doc, FetcherOutput fo, ParseText t, ParseData d) {
Document result = super.getDocument(seg,doc,fo,t,d);
// add my field result.add(Field.Keyword("myMetaField", d.get("myMetaField")));
return result; } }
Why we do not:
public Document getDocument
(String seg, long doc, FetcherOutput fo, ParseText t, ParseData d, Properties properties) {
Document result = super.getDocument(seg,doc,fo,t,d);
loop throw all properties {
result.add(Field.Keyword(propertyKey, d.get(propertyValue)));
}Stefan
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Nutch-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nutch-developers
