[SERVER-13127] Not possible to insert an array in shell bulk API Created: 10/Mar/14  Updated: 20/May/16  Resolved: 20/May/16

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 2.6.0-rc1
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Andreas Nilsson Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Done Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Participants:

 Description   

Attempting to insert an array fails with error message:

Error: operation passed in cannot be an Array

This is not consistent with the behavior of our standard insert write command.



 Comments   
Comment by Mira Carey [ 20/May/16 ]

The bulk api is more or less settled now and I think the shell works the way we want it to

Comment by A. Jesse Jiryu Davis [ 11/Mar/14 ]

spf13 care to comment?

Comment by A. Jesse Jiryu Davis [ 11/Mar/14 ]

This was a deliberate decision, I believe: since there's no network cost to calling bulk.insert(doc) for each document, we don't support bulk.insert(array_of_docs). To quote the Zen of Python:

> There should be one-- and preferably only one --obvious way to do it.

Comment by Daniel Pasette (Inactive) [ 11/Mar/14 ]

As it's a new interface, i'm not sure this is a bug, but a improvement request.

Generated at Thu Feb 08 03:30:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.