Home | About | Sematext search-lucene.com search-hadoop.com
 Search Lucene and all its subprojects:

Switch to Plain View
Solr, mail # dev - Namespaces in response (SOLR-1586)


+
Grant Ingersoll 2009-12-09, 13:30
+
Ramirez, Paul M 2009-12-09, 16:09
+
Yonik Seeley 2009-12-09, 16:33
+
Chris Hostetter 2009-12-09, 18:27
+
Chris Hostetter 2009-12-09, 18:36
+
Mattmann, Chris A 2009-12-09, 19:27
Copy link to this message
-
Re: Namespaces in response (SOLR-1586)
Chris Hostetter 2009-12-11, 20:07

: > 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 an
: > 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.

it's a damned-if-you-do/damned-if-you-don't situation though ... you look
at as "insulating" the response writers because all of the logic about
serializing data is in the FieldType, but i look at it as "poluting" the
FieldType with knowledge about the output formats -- there's a reason we
didn't add "writeBinary" to the FieldTYpe when the BinaryResponseWriter
was added ... the toObject abstraction let's the FieldType do whatever it
wants internally, and provide it's "best face" to the world when asked.  
the ResponseWriters can then apply hueristics to decide the most
compatible type they know of to use when representing it: "is it something
complex i have a codec for? no; oh well, then is it soemthing that
implemnets COllection? no; oh well, then is it something that is an
instanceof Number? no; oh well, as a last resort we can stringify"

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

I'm sure if we look hard enough at teh existing internal APIs, we can find
a way to generate completley broken XML that no DOM, SAX or pull parser
could possibly deal with cleanly -- but that doesn't mean we should do
that just because it would allow us to start outputing a bunch of metadata
that we think is useful.  breaking the (implicit) XML Schema is just as
bad as breaking the XML itself.

-Hoss
+
Mattmann, Chris A 2009-12-11, 21:57
+
Mattmann, Chris A 2009-12-09, 19:21
+
Chris Hostetter 2009-12-11, 19:58
+
Mattmann, Chris A 2009-12-11, 21:52
+
Chris Hostetter 2009-12-14, 23:18
+
Mattmann, Chris A 2009-12-15, 03:16
+
Chris Hostetter 2009-12-16, 02:39
+
Mattmann, Chris A 2009-12-16, 02:57
+
Chris Hostetter 2009-12-21, 15:29
+
Walter Underwood 2009-12-09, 18:18
+
Mattmann, Chris A 2009-12-09, 19:11
+
Walter Underwood 2009-12-09, 20:02
+
Mattmann, Chris A 2009-12-09, 16:44
+
Yonik Seeley 2009-12-09, 17:28
+
Mattmann, Chris A 2009-12-09, 19:02
+
Yonik Seeley 2009-12-09, 20:06
+
Mattmann, Chris A 2009-12-10, 06:09
+
Yonik Seeley 2009-12-09, 17:31
+
Mattmann, Chris A 2009-12-09, 17:40
+
Yonik Seeley 2009-12-09, 18:10
+
Mattmann, Chris A 2009-12-09, 19:11
+
Eric Pugh 2009-12-09, 19:22
+
Ramirez, Paul M 2009-12-09, 19:36
+
Mattmann, Chris A 2009-12-09, 14:33
+
Grant Ingersoll 2009-12-09, 15:13
+
Mattmann, Chris A 2009-12-09, 15:40