Return-Path: Delivered-To: apmail-lucene-solr-dev-archive@minotaur.apache.org Received: (qmail 73340 invoked from network); 9 Dec 2009 19:28:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Dec 2009 19:28:28 -0000 Received: (qmail 67121 invoked by uid 500); 9 Dec 2009 19:28:27 -0000 Delivered-To: apmail-lucene-solr-dev-archive@lucene.apache.org Received: (qmail 67024 invoked by uid 500); 9 Dec 2009 19:28:27 -0000 Mailing-List: contact solr-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-dev@lucene.apache.org Delivered-To: mailing list solr-dev@lucene.apache.org Received: (qmail 67014 invoked by uid 99); 9 Dec 2009 19:28:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Dec 2009 19:28:27 +0000 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [128.149.139.106] (HELO mail.jpl.nasa.gov) (128.149.139.106) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Dec 2009 19:28:15 +0000 Received: from mail.jpl.nasa.gov (altvirehtstap02.jpl.nasa.gov [128.149.137.73]) by smtp.jpl.nasa.gov (Switch-3.4.1/Switch-3.4.1) with ESMTP id nB9JRqlG003141 (using TLSv1/SSLv3 with cipher RC4-MD5 (128 bits) verified FAIL); Wed, 9 Dec 2009 11:27:53 -0800 Received: from ALTPHYEMBEVSP20.RES.AD.JPL ([128.149.137.82]) by ALTVIREHTSTAP02.RES.AD.JPL ([128.149.137.73]) with mapi; Wed, 9 Dec 2009 11:27:52 -0800 From: "Mattmann, Chris A (388J)" To: "solr-dev@lucene.apache.org" CC: "yonik@lucidimagination.com" Date: Wed, 9 Dec 2009 11:27:51 -0800 Subject: Re: Namespaces in response (SOLR-1586) Thread-Topic: Namespaces in response (SOLR-1586) Thread-Index: Acp4/qFGe8L1f6g3T7SbcTI6Ra68VAABxE7r Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Source-IP: altvirehtstap02.jpl.nasa.gov [128.149.137.73] X-Source-Sender: chris.a.mattmann@jpl.nasa.gov X-AUTH: Authorized X-Virus-Checked: Checked by ClamAV on apache.org Hi Hoss, > : ...unless things have changed since hte last time i looked, all of the > : "out of the box" response writers call "toString()" on any object they > : don't understand. So the best way to move forward in a flexible manner > : seems like it would be to add a new "GeoPoint" object to Solr, which > : toStrings to a simple "-34.56,67.89" for use by existing response write= rs > : as a string, but some newer smarter response writer could output it in > : some more sophisticated manner. >=20 > The caveat to that, now that i've skimmed SOLR-1586, is that it currently > only applies to objects "added" to the SolrQueryResponse (or one of hte > containers in it) datastructure that the ResponseWriter's "walk" > themselves ... because of the back-ass-wards way we have FieldTypes write > their values directly to an XMLWriter or a TextWriter the idea of using a= n > object that stringifies itself as needed doesn't really apply very well I think it's rather powerful. You insulate the following variations into 1 single place to change them (FieldType): * output representation * indexing * validation To remove this from FieldType would be to strew the same functionality across multiple classes, which doesn't make sense IMHO. > ... and it won't unless we switch all of the ResponseWRiters to follow th= e > BinaryResponseWriter model of using FieldType.toObject(...) to get the > field value as an "obejct" that can be sent over the wire -- then the > existing XmlResponseWriter, and the Text ResponseWriters, can call > toString() on Objects they doesn't understand, and some > newer/hipper/cooler response writers that understand georss can do fancie= r > things with it. In the long run, this might be nice, and +1 on getting there in the long run. In the short, a compromise is to allow namespacing on fields in the existing XmlWriter, which is allowed anyways, whether by oversight or not. Cheers, Chris ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Chris Mattmann, Ph.D. Senior Computer Scientist NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA Office: 171-266B, Mailstop: 171-246 Email: Chris.Mattmann@jpl.nasa.gov WWW: http://sunset.usc.edu/~mattmann/ Phone: +1 (818) 354-8810 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Adjunct Assistant Professor, Computer Science Department University of Southern California, Los Angeles, CA 90089 USA ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++