> : Any thoughts on this one? Why does Solr output a string in a long field > : with XMLResponseWriter but fails doing so (as it should) with the > : javabin format? > > performance. > > the XML Response writer doesn't make any attempt to validate data from > the index on the way out, the stored value in the index is a string, and > the stream it's writing to accepts strings, so it writes the value as a > string wrapped in <long> tags. > > The Binary response writer on the other hand streams strings differnetly > then longs, so it does care when it encounters the inforrect type, and it > errors. > > Bottom line: if your schema.xml is not consistent with your index, all > bets are off as to what the behavior will be.
That sounds quite reasonable indeed. But i don't understand why Solr doesn't throw an exception when i actually index a string in a long fieldType while i do remember getting some number formatting exception when pushing strings to an integer fieldType. With the current set up i can send a properly formatted date to a long fieldType, which should, in my opionion, punish me with an exception. > > > > -Hoss