Coder Social home page Coder Social logo

Comments (2)

runabol avatar runabol commented on July 1, 2024 3

Fair enough. Was able to work around this. Thanks!

from meilisearch.

dureuill avatar dureuill commented on July 1, 2024

hello @runabol 👋

The effect you are seeing is caused by the search algorithm of the semantic search. The semantic search uses an Approximate Nearest-Neighbor (ANN) search algorithm to find the limit+offset vectors that are the "closest" to the query vector.
Because the algorithm is approximate, increasing limit+offset might result in "closer" vectors being found, which means that the order of results is not guaranteed to remain stable for two distinct values of limit+offset.
As it is a design characteristic of ANN algorithms, and exact algorithms (kNN) don't scale with the number and size of vectors, this behavior is unlikely to be fixed.
As a workaround, you can set offset to 0, set a large value for limit, and then apply the pagination manually in frontend.
In the future, we might consider some mitigation to this behavior, where we would always, for example, consider the first few hundred results (as if limit+offset would be equal to, say 1000) regardless of the actual value of limit+offset. There's a correctness/performance tradeoff to measure here, though.

Thank you for the report ❤️

from meilisearch.

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.