: I think the initial geosearch feature can start off with
: <str>10,20</str> for a point.

+1.

The current XML format SOlr uses was designed to be extremely simple, very 
JSON-esque, and easily parsable by *anyone* in any langauge, without 
needing special knowledge of types .  It has been heavily advertised as 
only containing a very small handful of tags, representing primitive types 
(int, long, float, date, double, str) and basic collections (arr, lst, 
doc) ... even if id neverh ad a formal shema/DTD.  adding new tags to that 
-- name spaced or otherwise -- is a very VERY bad idea for clients who 
have come to expect that they can use very simple parsing code to access 
all the data.

introducing a new 'point" concept, wether as <point> or as 
<georss:point/>, is going to break things for people.

As discussed with Mattman in another thread -- some public methods in 
XMLWriter have inadvertantly made it possible for plugin writers to add 
their own XML tags -- but that doesn't mean we should do it in the core 
Solr distribution.  If you write your own custom XMLWriter you aren't 
allowed to be suprised when it contains new tags, but our "out of hte box" 
users shouldn't have to deal with such suprises.

As also discussed in that same thread thread: it makes a lot of sense 
in the long run to start having Response Writers that can generate more 
"rich" XML based responses and if there are already well defined standards 
for some of these concepts (like georss) then by all means we should 
support them -- but the existing XmlResponseWriter should NOT start 
generating new tags.

The contract for SolrQueryResponse has always said: 

>>>>> A SolrQueryResponse may contain the following types of Objects 
>>>>> generated by the SolrRequestHandler that processed the request.  
>>>>> ...  
>>>>> Other data types may be added to the SolrQueryResponse, but there is 
>>>>> no guarantee that QueryResponseWriters will be able to deal with 
>>>>> unexpected types.

...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 writers 
as a string, but some newer smarter response writer could output it in 
some more sophisticated manner.


-Hoss

Reply via email to