lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SOLR-1656) XInclude's are resolved relative CWD, not instance dir
Date Fri, 14 May 2010 20:48:47 GMT

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

Hoss Man commented on SOLR-1656:
--------------------------------

David: Interesting Idea.  i must admit that while it feels very dirty, it's simplicity has
some appeal.

I'm not positive, believe we could actually take this further by using ClassLoader.getResource()
to generate a systemId for items pulled from the classpath as well (but i'm not sure if hte
resulting URLs would be of any use to the DocumentBuilder if it doesn't also use the SolrResourceLoader)

Personally I think we should just bite the bullet and:
 * implement a new SolrResourceLoader.openResourceAsInputSource(String)
 * add the necessary constructors to start instantiating Config related options (SolrConfig,
IndexSchema, etc) from InputSources

what appeals to me about your idea is that it wouldn't conflict with adding support for InputSource,
and could work as a nice safety net for code that might use SolrResourceLoader to get an InputStream
even if we had a new method for getting InputSources.

(the one key change i might suggest is to replace your InputStreamWithSystemId class with
a one method marker interface "SystemIdable" and then use anonymous classes that implement
that method -- it seems a little cleaner, and allows for the possibility of decorating other
things with systemIds ... like Readers perhaps)

> XInclude's are resolved relative CWD, not instance dir
> ------------------------------------------------------
>
>                 Key: SOLR-1656
>                 URL: https://issues.apache.org/jira/browse/SOLR-1656
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.4
>            Reporter: Hoss Man
>         Attachments: SOLR-1656_Support_SAX_SystemId_via_wrapping_InputStream.patch
>
>
> As noted on the mailing list, when an XInclude in a config files refrences a relative
path, it's resolved relative the CWD of the servlet container, and not the instanceDir of
the core...
>  http://old.nabble.com/using-Xinclude-with-multi-core-to26548400.html#a26548400

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message