[jira] [Updated] (SOLR-8154) Schema API allows default value when adding dynamic field

2015-10-13 Thread Steve Rowe (JIRA)

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

Steve Rowe updated SOLR-8154:
-
Attachment: SOLR-8154.patch

Updated patch, including CHANGES.txt entry, and changing the expected error 
message in {{TestBulkSchemaAPI.testMultipleAddFieldWithErrors()}} which was 
affected by the {{add-field}} command switch from {{SchemaField.create()}} -> 
{{ManagedIndexSchema.newField()}}.

With this patch, all Solr tests pass.  I think it's ready.

> Schema API allows default value when adding dynamic field
> -
>
> Key: SOLR-8154
> URL: https://issues.apache.org/jira/browse/SOLR-8154
> Project: Solr
>  Issue Type: Bug
>  Components: Schema and Analysis
>Affects Versions: 5.3
>Reporter: Upayavira
>Assignee: Steve Rowe
>Priority: Minor
> Attachments: SOLR-8154.patch, SOLR-8154.patch
>
>
> The schema API refuses to create a dynamic field with required=true, but 
> accepts one that has a default value. This creates a schema that cannot be 
> loaded.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Updated] (SOLR-8154) Schema API allows default value when adding dynamic field

2015-10-13 Thread Steve Rowe (JIRA)

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

Steve Rowe updated SOLR-8154:
-
Component/s: (was: Data-driven Schema)
 Schema and Analysis

> Schema API allows default value when adding dynamic field
> -
>
> Key: SOLR-8154
> URL: https://issues.apache.org/jira/browse/SOLR-8154
> Project: Solr
>  Issue Type: Bug
>  Components: Schema and Analysis
>Affects Versions: 5.3
>Reporter: Upayavira
>Assignee: Steve Rowe
>Priority: Minor
> Attachments: SOLR-8154.patch
>
>
> The schema API refuses to create a dynamic field with required=true, but 
> accepts one that has a default value. This creates a schema that cannot be 
> loaded.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Updated] (SOLR-8154) Schema API allows default value when adding dynamic field

2015-10-13 Thread Steve Rowe (JIRA)

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

Steve Rowe updated SOLR-8154:
-
Attachment: SOLR-8154.patch

Patch with tests against both the to-be-deprecated-and-removed REST Schema API 
and the new bulk Schema API.

The REST API tests succeed - dynamic field creation calls to the 
{{/schema/dynamicfields}} endpoint fail when given {{'required':true}} or 
{{'default':whatever}}.

But the bulk Schema API fails for me under both conditions.  [~upayavira], what 
exactly is the request that properly fails for you when you specify 
{{'required':true}}?

The bulk Schema API issue appears to be that the {{add-dynamic-field}} command 
uses {{SchemaField.create()}} to create the new dynamic field, rather than 
{{ManagedIndexSchema.newDynamicField()}}, which includes quality checks, 
including calling {{IndexSchema.isValidDynamicField()}}, which tests for 
required=true and default values.  The patch switches field creation to 
{{ManagedIndexSchema.newDynamicField()}}.

The bulk Schema API {{add-field}} command has a similar issue: 
{{SchemaField.create()}} is used rather than {{ManagedIndexSchema.newField()}}, 
which also has quality checks.  The patch switches this call as well.

Running all Solr tests now.

> Schema API allows default value when adding dynamic field
> -
>
> Key: SOLR-8154
> URL: https://issues.apache.org/jira/browse/SOLR-8154
> Project: Solr
>  Issue Type: Bug
>  Components: Data-driven Schema
>Affects Versions: 5.3
>Reporter: Upayavira
>Assignee: Steve Rowe
>Priority: Minor
> Attachments: SOLR-8154.patch
>
>
> The schema API refuses to create a dynamic field with required=true, but 
> accepts one that has a default value. This creates a schema that cannot be 
> loaded.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Updated] (SOLR-8154) Schema API allows default value when adding dynamic field

2015-10-11 Thread Upayavira (JIRA)

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

Upayavira updated SOLR-8154:

Affects Version/s: 5.3

> Schema API allows default value when adding dynamic field
> -
>
> Key: SOLR-8154
> URL: https://issues.apache.org/jira/browse/SOLR-8154
> Project: Solr
>  Issue Type: Bug
>  Components: Data-driven Schema
>Affects Versions: 5.3
>Reporter: Upayavira
>Priority: Minor
>
> The schema API refuses to create a dynamic field with required=true, but 
> accepts one that has a default value. This creates a schema that cannot be 
> loaded.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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