lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: response writer 'default' action
Date Sun, 04 Mar 2007 16:58:28 GMT

: All the values used in the standard handlers are in the list, so this
: is fine.  I'm writing some custom handlers where it would be nice to
: put an arbitrary object into the response and have it printed out with
: toString()

Keep in mind, there is a contract about what constitutes "Returnable data"

...what you're describing would be a modification of that contract.

personaly, i'd prefer we encourage RequestHandler writers to stick to that
contract and unwind their objects themselves so that their RequestHandlers
can be reused with any ResponseWRiter ... but i agree it would be handy to
add a...

  public void writeUnknown(String name, Object val, boolean needsEscaping) {
    writeStr(name, val.getClass().getName() + ':' + val.toString(), needsEscaping);
  } the base writers so that people could override in subclasss
for special purposes and then call that in the else case.


View raw message