[jira] [Updated] (SOLR-4953) solrconfig.xml parsing should fail hard if there are multiple indexConfig/ blocks

2013-07-29 Thread Hoss Man (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-4953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hoss Man updated SOLR-4953:
---

Attachment: SOLR-4953.patch

it ocured to me last night that instead of just dealing explicitly with 
indexConfig here, we could probably help improve the validation of a lot of 
config parsing with a relatively simple change to Config.getNode: throw an 
error in any case where Solr is looking for a single Node/String/Int/Boolean 
and multiple values are found instead.

I wasn't sure how badly this might break things, but i've been testing it out 
today and except for a few cases where the text() xpath expression was getting 
abused (instead of a simple node check), it seems fairly straight forward.

So here's a patch that broadens the scope of the issue to fail hard if any 
single valued config option is found more then once in the config.

 solrconfig.xml parsing should fail hard if there are multiple indexConfig/ 
 blocks
 ---

 Key: SOLR-4953
 URL: https://issues.apache.org/jira/browse/SOLR-4953
 Project: Solr
  Issue Type: Bug
Reporter: Hoss Man
Assignee: Hoss Man
 Attachments: SOLR-4953.patch, SOLR-4953.patch


 while reviewing some code i think i noticed that if there are multiple 
 {{indexConfig/}} blocks in solrconfig.xml, one just wins and hte rest are 
 ignored.
 this should be a hard failure situation, and we should have a TestBadConfig 
 method to verify it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Updated] (SOLR-4953) solrconfig.xml parsing should fail hard if there are multiple indexConfig/ blocks

2013-07-28 Thread Hoss Man (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-4953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hoss Man updated SOLR-4953:
---

Attachment: SOLR-4953.patch

 solrconfig.xml parsing should fail hard if there are multiple indexConfig/ 
 blocks
 ---

 Key: SOLR-4953
 URL: https://issues.apache.org/jira/browse/SOLR-4953
 Project: Solr
  Issue Type: Bug
Reporter: Hoss Man
Assignee: Hoss Man
 Attachments: SOLR-4953.patch


 while reviewing some code i think i noticed that if there are multiple 
 {{indexConfig/}} blocks in solrconfig.xml, one just wins and hte rest are 
 ignored.
 this should be a hard failure situation, and we should have a TestBadConfig 
 method to verify it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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