milvus-io / milvus-sdk-node

The Official Mivus node.js sdk(client)
https://milvus.io
Apache License 2.0
122 stars 37 forks source link

Support more types of sparse vectors #293

Closed shanghaikid closed 6 months ago

shanghaikid commented 6 months ago

Only support array, coo, csr, dict for nodejs.

array:

const sparseArray = [
          undefined,
          0.0,
          0.5,
          0.3,
          undefined,
          0.2]
      */

csr:

const sparseCSR = {
          indices: [2, 5, 8],
          values: [5, 3, 7]
      };

coo:

const sparseCOO = [
          { index: 2, value: 5 },
          { index: 5, value: 3 },
          { index: 8, value: 7 }
        ];

dict:

const sparseObject = {
          3: 1.5,
          6: 2.0,
          9: -3.5
      };
sre-ci-robot commented 6 months ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: shanghaikid

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/milvus-io/milvus-sdk-node/blob/2.4/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.15%. Comparing base (5034a82) to head (63decf1).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## 2.4 #293 +/- ## ========================================== + Coverage 97.07% 97.15% +0.07% ========================================== Files 36 36 Lines 2120 2179 +59 Branches 567 585 +18 ========================================== + Hits 2058 2117 +59 Misses 54 54 Partials 8 8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.