[
https://issues.apache.org/jira/browse/SOLR-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17498907#comment-17498907
]
Jason Gerlowski edited comment on SOLR-6476 at 2/28/22, 1:55 PM:
-----------------------------------------------------------------
bq. But if you MUST perform another operation in between , the above syntax
cannot satisfy it
Sure - but what sort of operation fits that description [~noble.paul]? I can't
think of anything that'd cause an {{add-field}} to fail, short of the field
type not existing. And in that case, there's no need for the
{{add-field-type}} command to sit between two {{add-fields}}: it can always
come before any {{add-field}} operations.
Maybe this is just a failure of imagination on my part, but I'm starting to
wonder whether there might not be anything that requires this in practice.
There's lots of places where ordering matters: field types must be created
before they can be used, fields must exist before they can serve in a
copyfield, etc. But I can't come up with any examples where the ordering
requires interleaving operations of different types.
was (Author: gerlowskija):
bq. But if you MUST perform another operation in between , the above syntax
cannot satisfy it
Sure - but what sort of operation fits that description [~noble.paul]? I can't
think of anything that'd cause an {{add-field}} to fail, short of the field
type not existing. And in that case, there's no need for the
{{add-field-type}} command to sit between two {{add-fields}}: it can always
come before any {{add-field}} operations.
There's lots of places where ordering matters: field types must be created
before they can be used, fields must exist before they can serve in a
copyfield, etc. But I can't come up with any examples where the ordering
requires interleaving operations of different types.
> Create a bulk mode for schema API
> ---------------------------------
>
> Key: SOLR-6476
> URL: https://issues.apache.org/jira/browse/SOLR-6476
> Project: Solr
> Issue Type: New Feature
> Components: Schema and Analysis
> Reporter: Noble Paul
> Assignee: Noble Paul
> Priority: Major
> Labels: managedResource
> Fix For: 5.0, 6.0
>
> Attachments: SOLR-6476.patch, SOLR-6476.patch, SOLR-6476.patch,
> SOLR-6476.patch, SOLR-6476.patch, SOLR-6476.patch, SOLR-6476.patch,
> SOLR-6476.patch
>
>
> The current schema API does one operation at a time and the normal usecase is
> that users add multiple fields/fieldtypes/copyFields etc in one shot.
> example
> {code}
> curl http://localhost:8983/solr/collection1/schema -H
> 'Content-type:application/json' -d '{
> "add-field": {
> "name":"sell-by",
> "type":"tdate",
> "stored":true
> },
> "add-field":{
> "name":"catchall",
> "type":"text_general",
> "stored":false
> }
> }
> {code}
> or
> {code}
> curl http://localhost:8983/solr/collection1/schema -H
> 'Content-type:application/json' -d '{
> "add-field":[ {
> "name":"sell-by",
> "type":"tdate",
> "stored":true
> },
> {
> "name":"catchall",
> "type":"text_general",
> "stored":false
> }]
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]