GithubHelp home page GithubHelp logo

Comments (5)

fulmicoton avatar fulmicoton commented on June 17, 2024 1

Right... So Lucene introduced two step queries a long time ago. The idea is that scorer can express that they have some notion of .advanceWithFalsePositives() that is cheap and a checkIfReallyInDocset() function that is expensive to compute.

This is typically the case for a phrase query. .advanceWithFalsePositives() is typically just an intersection of the terms. checkIfReallyInDocset() requires to decode positionos and check if the terms align correctly somewhere in the document.

Now something interesting happens when running the query "a b" AND c.
The two step query system makes it possible to only decode positions for document that contain C.

If you scroll down in the benchmark that's precisely why added the query +"the who" +uk which is the hero scenario for this (because the and who are frequently in the same document.).
Lucene is indeed outperforming tantivy on that kind of query.

It would be interesting to find other kinds of examples

from search-benchmark-game.

fulmicoton avatar fulmicoton commented on June 17, 2024

added a query that benefits heavily from the two step queries.

from search-benchmark-game.

usamec avatar usamec commented on June 17, 2024

@fulmicoton any deeper description about what is exactly going on here? (link to some lucene documentation is enough).

from search-benchmark-game.

usamec avatar usamec commented on June 17, 2024

Thanks, and is tantivy planning to add this?

from search-benchmark-game.

fulmicoton avatar fulmicoton commented on June 17, 2024

Yes at one point. But right now, I don't think the extra complexity is worth the performance boost on specific queries. If a performance critical user shows up, I'll be happy to reproritize.

It's however a good idea to list these corner case where Lucene is faster than tantivy and show them in the bench.

from search-benchmark-game.

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.