You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Bryan Talbot (JIRA)" <ji...@apache.org> on 2009/05/14 07:54:45 UTC

[jira] Created: (SOLR-1167) Support module xml config files using XInclude

Support module xml config files using XInclude
----------------------------------------------

                 Key: SOLR-1167
                 URL: https://issues.apache.org/jira/browse/SOLR-1167
             Project: Solr
          Issue Type: New Feature
            Reporter: Bryan Talbot
            Priority: Minor


Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/

This feature is to add support for XInclude features for XML configuration files.


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


[jira] Commented: (SOLR-1167) Support module xml config files using XInclude

Posted by "Bryan Talbot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12710582#action_12710582 ] 

Bryan Talbot commented on SOLR-1167:
------------------------------------

It can't conditionally include content, no.  That can be achieved in startup scripts easy enough though: if the "-master" flag is given then copy the correct file into place and include it, if the "-slave" flag is given then copy the slave file into place, etc.

I believe we'd need to write code to handle conditional inclusion.  The XInclude stuff works at the XML parser level which knows nothing of system and environment variables of course.

-Bryan

> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Bryan Talbot
>            Priority: Minor
>         Attachments: SOLR-1167.patch, SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Commented: (SOLR-1167) Support module xml config files using XInclude

Posted by "Jianhan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12710551#action_12710551 ] 

Jianhan commented on SOLR-1167:
-------------------------------

It is good that we can now put certain configuration to a separate file with this change, but this does not seem to completely solve the problem raised in SOLR-1154, and we still have to use the hack to disable master/slave if we use the same package for master and slave. Is there a way to conditionally include one file or another (rather than include the other if one is not available)?

> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Bryan Talbot
>            Priority: Minor
>         Attachments: SOLR-1167.patch, SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Commented: (SOLR-1167) Support module xml config files using XInclude

Posted by "Bryan Talbot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760433#action_12760433 ] 

Bryan Talbot commented on SOLR-1167:
------------------------------------

I agree that the examples should be simple (yet functional) and this does complicate them.  I added changes to the configuration because a previous commented requested it.  I think changing the sample solrconfig to mention support for XInclude and document examples on the wiki is better for new users too.

Should I change the patch to remove the changes to the sample solrconfig and only include a comment about XInclude support?


> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.4
>            Reporter: Bryan Talbot
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Commented: (SOLR-1167) Support module xml config files using XInclude

Posted by "Peter Wolanin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12710200#action_12710200 ] 

Peter Wolanin commented on SOLR-1167:
-------------------------------------

I think you posted a sample snippet for solrconfig to the list - can you report here and possibly include in the patch a change to the sample schema or solrconfig that would demonstrate this feature?

> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Bryan Talbot
>            Priority: Minor
>         Attachments: SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Updated: (SOLR-1167) Support module xml config files using XInclude

Posted by "Bryan Talbot (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Talbot updated SOLR-1167:
-------------------------------

    Attachment: SOLR-1167.patch

Include changes to example solrconfig.xml to include master and slave settings from an external xml file.  The master file includes replication and dataimport handler definitions.

The inclusions are commented out currently.


> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Bryan Talbot
>            Priority: Minor
>         Attachments: SOLR-1167.patch, SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Updated: (SOLR-1167) Support module xml config files using XInclude

Posted by "Bryan Talbot (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Talbot updated SOLR-1167:
-------------------------------

    Attachment: SOLR-1167.patch

Updated patch to only add a comment to solrconfig.xml which refers to the wiki SolrConfigXml page for configuration options.  The wiki can then be updated to include details about using XInclude once it's available.

> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.4
>            Reporter: Bryan Talbot
>            Assignee: Grant Ingersoll
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Resolved: (SOLR-1167) Support module xml config files using XInclude

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Ingersoll resolved SOLR-1167.
-----------------------------------

    Resolution: Fixed

> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.4
>            Reporter: Bryan Talbot
>            Assignee: Grant Ingersoll
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Updated: (SOLR-1167) Support module xml config files using XInclude

Posted by "Bryan Talbot (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Talbot updated SOLR-1167:
-------------------------------

    Affects Version/s: 1.4

> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.4
>            Reporter: Bryan Talbot
>            Priority: Minor
>         Attachments: SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Commented: (SOLR-1167) Support module xml config files using XInclude

Posted by "Peter Karich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841178#action_12841178 ] 

Peter Karich commented on SOLR-1167:
------------------------------------

@Shalin Shekhar Mangar: how can I use the proposed attribute feature to be used for master+slave configuration? Do you have a code snippet?

> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.4
>            Reporter: Bryan Talbot
>            Assignee: Grant Ingersoll
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Commented: (SOLR-1167) Support module xml config files using XInclude

Posted by "Bryan Talbot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12753275#action_12753275 ] 

Bryan Talbot commented on SOLR-1167:
------------------------------------

Allowing the creation of the DBF when setXIncludeAware throws an exception is easy enough.  Detecting that there are xinclude elements present seems much harder since that is all handled by the XML parser.  How about if a warning log message is generated if setXIncludeAware can't be set?

> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Bryan Talbot
>            Priority: Minor
>         Attachments: SOLR-1167.patch, SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Updated: (SOLR-1167) Support module xml config files using XInclude

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Ingersoll updated SOLR-1167:
----------------------------------

    Attachment: SOLR-1167.patch

Added a test for this.  I'm not sure if it is the right way to go.  I don't want the test to fail if the person running it doesn't have a DocumentBuilder that supports it, b/c that wouldn't fail in the live case either.

Thoughts?  I'd like to close this one out.

> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.4
>            Reporter: Bryan Talbot
>            Assignee: Grant Ingersoll
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Commented: (SOLR-1167) Support module xml config files using XInclude

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12721879#action_12721879 ] 

Hoss Man commented on SOLR-1167:
--------------------------------

I like the simplicity of the patch, and the use of an existing standard.  If I'd realized that xinclude was supported by DocumentBuilderFactory i would have tried this a long time ago ... my only concern is how well supported this feature is in the various DBF impls out there.

BTW: the redundent snippets in DataImporter.java and COnfig.java make me think we need to refactor a helper function for this somewhere in utils, but that's not a huge issue.

bq. Is there a way to conditionally include one file or another (rather than include the other if one is not available)?

Keep in mind that the problem can be inverted: instead of having a common solrconfig.xml file that conditionally includes master-snippet.xml or slave-snippet.xml based on some property, you can have unique solrconfig.xml files for the master and slave (in separate solr home dirs) which only contain the unique options and include the common chunks from other files .. then you can use solr.solr.home to drive which set of configs to use.


> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Bryan Talbot
>            Priority: Minor
>         Attachments: SOLR-1167.patch, SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Updated: (SOLR-1167) Support module xml config files using XInclude

Posted by "Bryan Talbot (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Talbot updated SOLR-1167:
-------------------------------

    Attachment: SOLR-1167.patch

> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Bryan Talbot
>            Priority: Minor
>         Attachments: SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Updated: (SOLR-1167) Support module xml config files using XInclude

Posted by "Bryan Talbot (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Talbot updated SOLR-1167:
-------------------------------

    Fix Version/s: 1.4

The patch is for the trunk, currently 1.4 

> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.4
>            Reporter: Bryan Talbot
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Commented: (SOLR-1167) Support module xml config files using XInclude

Posted by "Henri Biestro (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12753840#action_12753840 ] 

Henri Biestro commented on SOLR-1167:
-------------------------------------

Just a thought; wouldn'it be possible to use system entities (as in SOLR-712 / SOLR-646) to have variables resolution in entities and use those in the xi:include href ? 
{code}
<!DOCTYPE schema [
<!ENTITY myevar SYSTEM "solr:${myvar}">
]>
...
<xi:include href="&myevar;".../>
...
{code}
This would allow include of files using variables using standards without reverting the inclusion logic.

In any case, thanks Bryan for pushing this.

> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Bryan Talbot
>            Priority: Minor
>         Attachments: SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Commented: (SOLR-1167) Support module xml config files using XInclude

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760836#action_12760836 ] 

Hoss Man commented on SOLR-1167:
--------------------------------


bq. Detecting that there are xinclude elements present seems much harder since that is all handled by the XML parser. How about if a warning log message is generated if setXIncludeAware can't be set?

It occured to me that setNamespaceAware(true) has no documented failure case - every DBF implementation is suppose to support it.   So as long as the DocumentBuilder is namespace aware, then if setXIncludeAware(true) fails, we could (in theory) inspect the resulting DOM Document to see if there are any "{http://www.w3.org/2001/XInclude}include" nodes in the document -- if there are then the config was expecting XInclude support and we can fail with a hard error, if not then they didn't care about XInclude support anyway, so no need to log a warning if it's not supported

(I'm just throwing this out there as an idea -- if someone wants to try implementing it then great, but  i don't think it should be a roadblock for the existing patch, because honestly: as long as we document that XInclude depends on XML parser support, then if people add XIncludes to their configs, but don't test to verify that it's working in environment they're on their own and i won't feel bad if something fails silently)

> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.4
>            Reporter: Bryan Talbot
>            Assignee: Grant Ingersoll
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Commented: (SOLR-1167) Support module xml config files using XInclude

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760246#action_12760246 ] 

Grant Ingersoll commented on SOLR-1167:
---------------------------------------

Patch looks fine, just not sure that we should add this into the example since it just adds more files to an already.  Perhaps just some comments and some writeup on the wiki in the SolrConfig page?

> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.4
>            Reporter: Bryan Talbot
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Commented: (SOLR-1167) Support module xml config files using XInclude

Posted by "Bryan Talbot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12710537#action_12710537 ] 

Bryan Talbot commented on SOLR-1167:
------------------------------------

Support for xinclude will allow a few options to include xml (or non-xml) content from an external file.  The external file can be loaded from the file system or from any HTTP resource.

Here are some examples:

  <!-- include solrconfig_master.xml from the file system and generate an error if the file can't be found -->
  <xi:include href="solr/conf/solrconfig_master.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>


  <!-- include solrconfig_master.xml from an HTTP URL and ignore it if it's missing -->
  <xi:include href="http://localhost:8983/solr/admin/file/?file=replication_master.xml" 
                    xmlns:xi="http://www.w3.org/2001/XInclude">
    </xi:fallback/>
  </xi:include>


  <!-- include solrconfig_master.xml from the filesystem.  If it cannot be found, attempt
        to include solrconfig_slave.xml from the filesystem.  If neither file can be found, don't
        generate an error.
     -->
  <xi:include href="solr/conf/solrconfig_master.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
    <xi:fallback>
      <xi:include href="solr/conf/solrconfig_slave.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
        <xi:fallback/>
      </xi:include>
    </xi:fallback>
  </xi:include>


  <!-- attempt to include an optional file containing index options.  If the file can't be found, fall back to some
        default values.
   -->
  <xi:include href="solr/conf/solrconfig_indexOptions.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
    <xi:fallback>
      <useCompoundFile>false</useCompoundFile>
      <ramBufferSizeMB>32</ramBufferSizeMB>
      <mergeFactor>10</mergeFactor>
      <maxMergeDocs>2147483647</maxMergeDocs>
      <maxFieldLength>10000</maxFieldLength>
    </xi:fallback>
  </xi:include>


I'll update the patch to include solrconfig_master.xml and solrconfig_slave.xml files if they are present in the solr/conf directory.  The inclusions are currently commented out and the resulting configuration is equivalent to the existing sample config.



> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Bryan Talbot
>            Priority: Minor
>         Attachments: SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Commented: (SOLR-1167) Support module xml config files using XInclude

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760573#action_12760573 ] 

Grant Ingersoll commented on SOLR-1167:
---------------------------------------

That would be my vote.  If you can do that, I'll take a look today.

> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.4
>            Reporter: Bryan Talbot
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Assigned: (SOLR-1167) Support module xml config files using XInclude

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Ingersoll reassigned SOLR-1167:
-------------------------------------

    Assignee: Grant Ingersoll

> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.4
>            Reporter: Bryan Talbot
>            Assignee: Grant Ingersoll
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Commented: (SOLR-1167) Support module xml config files using XInclude

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761214#action_12761214 ] 

Grant Ingersoll commented on SOLR-1167:
---------------------------------------

Committed revision 820652.

Bryan, can you update the Wiki?

> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.4
>            Reporter: Bryan Talbot
>            Assignee: Grant Ingersoll
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Commented: (SOLR-1167) Support module xml config files using XInclude

Posted by "Bryan Talbot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12753186#action_12753186 ] 

Bryan Talbot commented on SOLR-1167:
------------------------------------

What needs to happen to get this into 1.4 before the code freeze?

> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Bryan Talbot
>            Priority: Minor
>         Attachments: SOLR-1167.patch, SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Commented: (SOLR-1167) Support module xml config files using XInclude

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761162#action_12761162 ] 

Grant Ingersoll commented on SOLR-1167:
---------------------------------------

I still think it is useful to be able to use XInclude. 

> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.4
>            Reporter: Bryan Talbot
>            Assignee: Grant Ingersoll
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Commented: (SOLR-1167) Support module xml config files using XInclude

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12753191#action_12753191 ] 

Mark Miller commented on SOLR-1167:
-----------------------------------

Could we:

if setxincludeaware throws unsupported, load the dbf without that setting, and if contains an include, throw an exception saying its unsupported with the current impl your using? I think its fairly well supported in anything even semi recent.

> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Bryan Talbot
>            Priority: Minor
>         Attachments: SOLR-1167.patch, SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Commented: (SOLR-1167) Support module xml config files using XInclude

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761160#action_12761160 ] 

Shalin Shekhar Mangar commented on SOLR-1167:
---------------------------------------------

Bryan, I'm not sure if you have followed recent developments. Now it is possible to add a enable attribute to any solr plugin and value of the enable attribute can be driven from an external properties file. With this you don't need separate solrconfig.xml files for master/slave. This is the approach we are using. Was that the original use-case behind this feature?

> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.4
>            Reporter: Bryan Talbot
>            Assignee: Grant Ingersoll
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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


[jira] Updated: (SOLR-1167) Support module xml config files using XInclude

Posted by "Bryan Talbot (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Talbot updated SOLR-1167:
-------------------------------

    Attachment: SOLR-1167.patch

Patch updated to apply cleanly to more recent trunk (r813098).  It also catches an exception if the setXIncludeAware(true) method is unsupported and allows the DBF to still be created.  A warning log is generated in this case: "XML parser doesn't support XInclude option"

> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Bryan Talbot
>            Priority: Minor
>         Attachments: SOLR-1167.patch, SOLR-1167.patch, SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance and reuse more difficult that it needs to be.  The XML standards include a feature to include content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

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