[ 
https://issues.apache.org/jira/browse/SOLR-17?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791146#action_12791146
 ] 

Chris A. Mattmann commented on SOLR-17:
---------------------------------------

@Uri:

{quote}
Fair enough. I guess it can always serve as a reference to better understanding 
what to expect from a Solr response (instead of trying to figure things out 
from the code). Good thing about this generic format is that it's unlikely to 
change that frequently, so the XSD's will probably not change that often as 
well.
{quote}

+1, thanks for hearing me out!

@Hoss

{quote}
1. where should it live in source control? where should it live in the release 
artifact?
2. what schema URI should we pick for identifying this? (i suspect apache.org 
has a standard for this, so or at least precident from other projects, so we 
should make sure we follow those examples before picking one arbitrarily
{quote}

In src, I think it should live here: src/xsd (let's call it solrresponse.xsd), 
and let's make a DTD too (called solrresponse.dtd) that lives in src/dtd. In 
release, let's make it live somewhere that gets published onto the SOLR website 
(you guys are using forrest, right? I can put a patch together that copies it 
to the right place). It would be great to have it at, say:

http://lucene.apache.org/solr/schema/solrresponse.xsd
http://lucene.apaceh.org/solr/dtd/solrresponse.dtd

In the long term, maybe we could version the URIs too, based on the current 
SOLR version, but that's down the road.

{quote}
3. it won't do any good unless we make the XmlResponseWriter refrence the 
schema URI so client tools can validate with it.
{quote}

Well it'll do some good just to have it out there. I'm a fan of incremental 
patchiness, so as a start, can we make this issue just put the XSD/DTD into the 
src, and then copy it to a Forrest accessible link, and then a do site rebuild? 
Then, as patch #2, we tackle your #3 above. I agree, #3 is pretty trivial 
(modifying a static final String in XMLWriter.java), but to me we can do it as 
a separate, clean patch, not cluttered with adding the XSD/DTD and then 
modifying Forrest (which this patch can do).

{quote}
4. we need hooks in our own test system for validating responses we get back to 
catch potential bugs (either in the schema itself, or in xml that might get 
inadvertantly changed)
{quote}

I think this is patch #3, or maybe #2a (and can go in along with #2 above), but 
+1 for this too. I'm happy to contribute/lead the efforts here. I'll start 
preparing patches right away.

Cheers,
Chris



> XSD for solr requests/responses
> -------------------------------
>
>                 Key: SOLR-17
>                 URL: https://issues.apache.org/jira/browse/SOLR-17
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Mike Baranczak
>            Priority: Minor
>         Attachments: solr-complex.xml, solr-rev2.xsd, solr.xsd, 
> UselessRequestHandler.java
>
>
> Attaching an XML schema definition for the responses and the update requests. 
> I needed to do this for myself anyway, so I might as well contribute it to 
> the project.
> At the moment, I have no plans to write an XSD for the config documents, but 
> it wouldn't be a bad idea.
> TODO: change the schema URL. I'm guessing that Apache already has some sort 
> of naming convention for these?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to