Giter VIP home page Giter VIP logo

Comments (3)

bratseth avatar bratseth commented on April 29, 2024

Just write all the data and let Vespa deal with partitioning it for you.

Yes, it may be slightly more efficient to pre-partition when your queries only searches precisely one partition, but this is a special case, and I don't think the potential benefit outweights the additional complexity and interface surface. It's not much faster than filtering on an attribute with fast-search, and once you need to search across multiple partitions, it becomes slower.

from vespa.

ddorian avatar ddorian commented on April 29, 2024

Note that I want double partitioning (so each 'partition' will be distibuted).
And while it is a special case for Vespa, it's a normal case for this app to search 1/100 of data.
And the complexity on the app side would be small I think.
And I wouldn't need to keep all data(attributes) in memory, at leas not the old ones. While fast-search it would require even more memory.

I don't understand how fast-search would make things faster though ? You still have to merge bitsets from the other filters. (and partitioning will just make all bitsets smaller)
Needs to be some more explanation in the docs I think (like doc-types are stored separately? fast-search? attributes in-memory all-time or by-request, does each node have 1 inverted-index (or per-core))

Maybe by using different document-types ? Assuming they live in separate inverted-indexes.

from vespa.

bratseth avatar bratseth commented on April 29, 2024

Each document type is a separate instance of everything, yes.
Few people have the technical expertise to appreciate more implementation details in the doc, so I'm not sure it is worth it ...

Fast-search adds a B-tree over the attribute. Since (presumably) this attribute will be a strong filter it will be used to skip most of the document space without further work.

If you use partition to put more data on the node than you can search, then there needs to be protection from searching too many of them at the same time because one such query would then kill all the nodes. And, you'd need to have support for unloading a partition when another is needed (or, some more complicated eviction strategy where N can be kept at the same time). But at what time do you unload given that many queries run in parallel. And if you can make that work one query for an old partition will make the response time of all subsequent queries go through the roof ... this is the kind of complexity I mean.

At the very least this would be premature optimization. I suggest you try the straightforward approach first.

from vespa.

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.