Dawid Weiss wrote:
DC> A longer term fix might be to add an option to construct summaries
DC> directly as plain text. This might be done as follows:
DC> - replace Summary.toString() with both toText() and toHtml() methods;
DC> - replace HitSummarizer.getSummary() with getHtmlSummary() and DC> getTextSummary(). This would require changes to NutchBean, DC> DistributedSearch, etc.


I think the latter approach provides a cleaner solution. I will
implement it and provide a patch to this list.

I've thought a bit more about this. Other folks have also wanted to alter summaries in order to achieve different effects. So whatever solution we come up with should be easily extensible. Adding new methods each time probably isn't the best route.


So I think a better approach is to make it easy to plug in different summarizer on the backend. Then you just alter your configuration to name a different summarizer, and, voila, you get the style of summary you desire.

Until we have a more elaborate plugin mechanism, I think the best approach is to add a config file option which names a class which implements HitSummarizer, then somehow install an instance of that on NutchBean line 80, where the summarizer is specified. It's a little more complicated than that, but I think you get the general idea.

Does that sound like a reasonable approach?

Doug



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Nutch-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nutch-developers

Reply via email to