|
82 | 82 | ],
|
83 | 83 | "description": "Returns a count of the number of documents at this stage of the aggregation pipeline."
|
84 | 84 | },
|
| 85 | + "MongoDB Aggregations $densify": { |
| 86 | + "prefix": "$densify", |
| 87 | + "body": [ |
| 88 | + "/**", |
| 89 | + " * field: The required field to densify.", |
| 90 | + " * partitionByFields: The set of fields that acts as a compound key to define each partition.", |
| 91 | + " * range: {", |
| 92 | + " * step: The amount to increment the field value in each document.", |
| 93 | + " * unit: If specified field must evaluate to a date for every document in the collection, otherwise must evaluate to a numeric.", |
| 94 | + " * bounds: A string or array of numeric/date bounds, corresponding to the type of the field.", |
| 95 | + " * }", |
| 96 | + " */", |
| 97 | + "\\$densify: {", |
| 98 | + " field: ${1:string},", |
| 99 | + " partitionByFields: [${2:string}, ${3:string}, ...],", |
| 100 | + " range: {", |
| 101 | + " step: ${4:number},", |
| 102 | + " unit: ${5:string},", |
| 103 | + " bounds: [${6:lowerbound}, ${7:upperbound}, ...]", |
| 104 | + " }", |
| 105 | + "}" |
| 106 | + ], |
| 107 | + "description": "Creates new documents to eliminate the gaps in the time or numeric domain at the required granularity level." |
| 108 | + }, |
| 109 | + "MongoDB Aggregations $documents": { |
| 110 | + "prefix": "$documents", |
| 111 | + "body": [ |
| 112 | + "/**", |
| 113 | + " * expression: Any valid expression.", |
| 114 | + " */", |
| 115 | + "\\$documents: {", |
| 116 | + " ${1:expression}", |
| 117 | + "}" |
| 118 | + ], |
| 119 | + "description": "Returns literal results for a full-text search." |
| 120 | + }, |
85 | 121 | "MongoDB Aggregations $facet": {
|
86 | 122 | "prefix": "$facet",
|
87 | 123 | "body": [
|
|
318 | 354 | "prefix": "$search",
|
319 | 355 | "body": [
|
320 | 356 | "/** ",
|
321 |
| - " * index: the name of the Search index.", |
| 357 | + " * index: The name of the Search index.", |
322 | 358 | " * text: Analyzed search, with required fields of query and path, the analyzed field(s) to search.",
|
323 | 359 | " * term: Un-analyzed search.",
|
324 | 360 | " * compound: Combines ops.",
|
|
337 | 373 | ],
|
338 | 374 | "description": "Performs a full-text search on the specified field(s)."
|
339 | 375 | },
|
| 376 | + "MongoDB Aggregations $searchMeta": { |
| 377 | + "prefix": "$searchMeta", |
| 378 | + "body": [ |
| 379 | + "/**", |
| 380 | + " * index: The name of the Search index.", |
| 381 | + " * count: The count of the results.", |
| 382 | + " * facet: {", |
| 383 | + " * operator: Analyzed search, with required fields of query and path, can either be replaced with the name of a valid operator.", |
| 384 | + " * facets: {", |
| 385 | + " * stringFacet: Narrows search results based on unique string values, with required fields of type and path.", |
| 386 | + " * numberFacet: Narrows search results by breaking them up into separate ranges of numbers, with required fields of type, path, and boundaries.", |
| 387 | + " * dateFacet: Narrows search results by breaking them up into separate ranges of dates, with required fields of type, path, and boundaries.", |
| 388 | + " * }", |
| 389 | + " * }", |
| 390 | + " */", |
| 391 | + "\\$searchMeta: {", |
| 392 | + " index: ${1:string},", |
| 393 | + " facet: {", |
| 394 | + " operator: {", |
| 395 | + " text: {", |
| 396 | + " query: ${2:string},", |
| 397 | + " path: ${3:string}", |
| 398 | + " }", |
| 399 | + " },", |
| 400 | + " facets: {", |
| 401 | + " ${4:stringFacet}: {", |
| 402 | + " type: ${5:string},", |
| 403 | + " path: ${6:string},", |
| 404 | + " numBuckets: ${7:integer}", |
| 405 | + " },", |
| 406 | + " numberFacet: {", |
| 407 | + " type: 'number',", |
| 408 | + " path: ${8:string},", |
| 409 | + " boundaries: [${9:lowerbound}, ${10:upperbound}, ...],", |
| 410 | + " default: ${11:string}", |
| 411 | + " }", |
| 412 | + " }", |
| 413 | + " }", |
| 414 | + "}" |
| 415 | + ], |
| 416 | + "description": "Performs a full-text search on the specified field(s) and gets back only the generated search meta data from a query." |
| 417 | + }, |
340 | 418 | "MongoDB Aggregations $set": {
|
341 | 419 | "prefix": "$set",
|
342 | 420 | "body": [
|
|
374 | 452 | " ${3:path}: {",
|
375 | 453 | " ${4:function}: ${5:functionArgs},",
|
376 | 454 | " window: {",
|
377 |
| - " documents: [${6:lowerBound}, ${7:upperBound}],", |
378 |
| - " range: [${8:lowerBound}, ${9:upperBound}],", |
| 455 | + " documents: [${6:lowerbound}, ${7:upperbound}],", |
| 456 | + " range: [${8:lowerbound}, ${9:upperbound}],", |
379 | 457 | " unit: ${10:string}",
|
380 | 458 | " }",
|
381 | 459 | " },",
|
|
0 commit comments