[SERVER-37537] createIndex Command takes only one optional Parameter Created: 10/Oct/18 Updated: 27/Oct/23 Resolved: 10/Oct/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | 3.4.16, 4.0.1 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Major - P3 |
| Reporter: | Tanveer Madan Marate | Assignee: | Nick Brewer |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
Hi, We are trying to create Index with below command db.traffic_data.createIndex( {process: 1}, {storageEngine:{wiredTiger: {configString:"block_compressor=zlib"}}},{background: "True"}) It runs as foreground but but picks the storage options The case is reversed when I use below command, it runs as background but without the storage options db.traffic_data.createIndex( {process: 1},{background: "True"}, {storageEngine:{wiredTiger: {configString:"block_compressor=zlib"}}})
Thanks, |
| Comments |
| Comment by Tanveer Madan Marate [ 10/Oct/18 ] | |
|
Thanks Nick !!!
| |
| Comment by Nick Brewer [ 10/Oct/18 ] | |
|
tanveermadan The options should be passed to createIndex as a single document, not individually. Additionally, the value of Background should be a boolean rather than a string, so the correct syntax would be:
Regards, |