As I mentioned in a previous email, I think that a better way to do this is to not add new methods for each new format, but rather add a parameter that indicates what sort of summary is required, then plugin different implementations on the backend that can switch on this parameter. Concretely, I proposed that we add a method

HitDetails#add(String field, String value);

Then, if you want a non-default summary for your configuration, you can do something like:

    Hits hits = bean.search(query, 10);
    int length = (int)Math.min(hits.getTotal(), 10);
    Hit[] show = hits.getHits(0, length);
    HitDetails[] details = bean.getDetails(show);
    for (int i = 0; i < hits.getLength(); i++) {
       details[i].add("my.summary.type", "xml");
    }
    String[] summaries = bean.getSummary(details, query);

Does that make sense?

Doug

Stefan Groschupf wrote:

A longer term fix might be to add an option to construct summaries directly as plain text. This might be done as follows:
- replace Summary.toString() with both toText() and toHtml() methods;


What's about Summery.getXML()?

I already looked in the NutchBean and JSP to separate content from design to fit Franks needs for a search result XML.

Stefan



-------------------------------------------------------
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


-------------------------------------------------------
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