GithubHelp home page GithubHelp logo

Comments (4)

shanghaikid avatar shanghaikid commented on May 31, 2024

if you want count, you can just count it by yourself, here is my test code, all you need is the res.data.length?

  it(`Query with data limit only`, async () => {
    const expr = 'age > 0';
    const res = await milvusClient.query({
      collection_name: COLLECTION_NAME,
      expr: expr,
      output_fields: ['age', 'meta', VECTOR_FIELD_NAME],
      limit: 3,
    });

    expect(res.data.length).toBe(3);
  });

from milvus-sdk-node.

geminigeek avatar geminigeek commented on May 31, 2024

this is perfect but only if the query is running on the server where milvus is installed, if i run it from another server all ids are transferring over the network, while i just want a count!

from milvus-sdk-node.

shanghaikid avatar shanghaikid commented on May 31, 2024

this is perfect but only if the query is running on the server where milvus is installed, if i run it from another server all ids are transferring over the network, while i just want a count!

As far as I know, milvus doesn't provide these feature, we can do nothing more in the client(sdk), I can provide the length for you directly, but the load will still be transferred through the network.

if you don't want too much load, you can set the out_fields with only 1 field.

Maybe you can create an issue in the milvus repo.

from milvus-sdk-node.

geminigeek avatar geminigeek commented on May 31, 2024

hi,
thanks for your reply, i was thinking same i will open an issue in milvus repo.

from milvus-sdk-node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.