Code Monkey home page Code Monkey logo

Comments (3)

mengrennwpu avatar mengrennwpu commented on August 16, 2024

When I change the model 'lsh' to 'exact' during hybrid search , it works correctly. But as you know, performance will be affected.

from elastiknn.

alexklibisz avatar alexklibisz commented on August 16, 2024

Hi @mengrennwpu, there are some known caveats with the function-score query: https://alexklibisz.github.io/elastiknn/api/#using-a-function-score-query

When using "model": "lsh", the "candidates" parameter is ignored and vectors are not re-scored with the exact similarity like they are with a elastiknn_nearest_neighbors query. Instead, the score is: max similarity score * proportion of matching hashes. This is a necessary consequence of the fact that score functions take a doc ID and must immediately return a score.

Perhaps that is happening here?

Also, I'm confused why your example is using size: 10 but only returning 2 results. Are you omitting some results? Or is this the actual complete response?

from elastiknn.

mengrennwpu avatar mengrennwpu commented on August 16, 2024

@alexklibisz Thank you very much for your response.

The response you referred to regarding the function-score query is correct. And yes, I omitted some results, i'm sorry for causing any misunderstanding.

from elastiknn.

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.