Giter Club home page Giter Club logo

Comments (3)

ashvardanian avatar ashvardanian commented on June 3, 2024 1

Thank you @kernelsoe! Such an API indeed makes sense. We can implement it at least slightly more efficiently than the remove & add combo, by reusing the same memory buffers under the hood. However, generally, remove is discouraged. As part of any operation or standalone.

How many vectors do you generally deal with?

from usearch.

kernelsoe avatar kernelsoe commented on June 3, 2024

@ashvardanian For my use case, I'm trying to load and add a few hundred user notes from sqlite into usearch on app startup without remove op then as the user edits 1 or reflecting multiple notes, I'm reindexing by removing and adding all with the same key again.

Doing this combined operation for multiple times in 1 function call would sometimes throw error, so I did something like below for now 😄:

for (const payload of payloads) {
  await remove()...
  await timeout(300)
}

for (const payload of payloads) {
  await add()...
  await timeout(300)
}

May be I should use batch op?

from usearch.

sroussey avatar sroussey commented on June 3, 2024

Aside: There is a sqlite plugin sqlite-vss that adds vector search, but unfortunately uses FAISS Flat not HNSW. In addition, updates are not supported, so it seems the issue is elsewhere. I think pg-vector rolled their own.

While I wish this was inside sqlite, I am looking forward to using it side by side like you are.

from usearch.

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.