lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <>
Subject Namespaces in response (SOLR-1586)
Date Wed, 09 Dec 2009 13:30:22 GMT
In SOLR-1586, the proposed patch introduces the concept that a Solr response can declare a
namespace for part of the response (in this case, it is using the tags defined by
to specify a point, etc.).  I'm not sure what to make of this.  My gut reaction says no, but
I'm not a namespace expert and I also don't feel strongly about it.

Discussion points:
1. If there are standard namespaces, then people can use them to do fun XML things
2. If we allow them, we get all of the other benefits of namespaces...
3. The indexing side doesn't support them, so it seems odd to put in something like <field
name="point">55.3 27.9</field> and get back <georss:point name="point"> 55.3
27.9</georss:point>.  At the same time, it seems equally weird to get back <str name="point">...</str>
when there is in fact more semantic information available about this particular field that
would otherwise require more work by an application to make sense of.
4. If we let in other namespaces, we then are opening ourselves to longer responses, etc.
 It is also likely the case that there isn't just one standard.  This likely could mean slower
responses, etc.
5. If people wanted them, they could just do XSLT, but that is an extra step too.

An alternative is that we could refactor things a bit and allow the FieldType to specify the
tag name instead of it being hardcoded in the writers.  This way people writing FieldTypes
could define them.  For instance, we could have FieldType.getTagName() that could be overridden
and clients could have tools for introspecting this.

I'm not sure what effect any of this would have on downstream clients, either.


View raw message