[JAVA-1050] Establishing an empty array during insert Created: 14/Nov/13 Updated: 11/Sep/19 Resolved: 15/Nov/13 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Command Operations |
| Affects Version/s: | 2.4 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor - P4 |
| Reporter: | Matt Reichert | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
development |
||
| Description |
|
Hi there, We're setting up a document collection that will hold 24 months of data result sets that we'll use to supply data to our reporting applications. We're going to build up the documents month-by-month, and are using a TTL index (so we have PowerOf2Sizes for the collection). I thought I had understood that we can help with space allocation by allocating 24 elements to the array when we first create the document. My question is, what's the most efficient way to do that? I thought I could use the $setOnInsert property to establish the array, then use a $set in the same update statement to insert the element into the array, but I found that's not allowed. Thanks for your help! Matt |
| Comments |
| Comment by Jeffrey Yemin [ 15/Nov/13 ] |
|
Hi Matt, This particular Jira project it for reporting bugs or requesting features for the MongoDB Java driver. I suggest you ask your question in a different forum, either StackOverflow or the mongodb-user Google group. Regards, |