Coder Social home page Coder Social logo

Comments (9)

saimaz avatar saimaz commented on September 23, 2024

Function score now has a different structure and don't use script_score if I don't miss anything.

https://www.elastic.co/guide/en/elasticsearch/reference/5.1/query-dsl-function-score-query.html#function-script-score

Removing params might not solve the issue.

from elasticsearchdsl.

saimaz avatar saimaz commented on September 23, 2024

My bad, actually params seems are still there in 5.x: https://www.elastic.co/guide/en/elasticsearch/reference/5.1/query-dsl-function-score-query.html#function-script-score

from elasticsearchdsl.

KnysakPatryk avatar KnysakPatryk commented on September 23, 2024

For now it's just throwing exception and kills the script (even if you don't use this feature). With this fix it's not throwing exception. But I know, for fixing this issue entirely, it's required to make futher changes.

from elasticsearchdsl.

saimaz avatar saimaz commented on September 23, 2024

Let's take a look if there is possible to make some adjustments by keeping BC for 2.x Elasticsearch. If the params causes exception maybe it can be filtered out if this is an empty array?

from elasticsearchdsl.

KnysakPatryk avatar KnysakPatryk commented on September 23, 2024

In my opinion we should BC. Even elasticsearch/elasticsearch recommends using v5 library with v5 ES. To be honest, this library is not working good with complicated queries accross different ES versions. If you don't believe me, just check it out by yourself.

from elasticsearchdsl.

saimaz avatar saimaz commented on September 23, 2024

elasticsearch/elasticsearch v5 dropped 2.x support for a number of other reasons. Since this library just builds a query, it was ok.

This is the first example it causes search body differences. And if there is no solution, for sure I will release a new major version by dropping 2.x support as well.

from elasticsearchdsl.

saimaz avatar saimaz commented on September 23, 2024

Related to #177

from elasticsearchdsl.

saimaz avatar saimaz commented on September 23, 2024

Fixed in #186

from elasticsearchdsl.

saimaz avatar saimaz commented on September 23, 2024

There is also a test PR (#189) which will check if function score is working correctly on 2.x and 5.x elasticsearch.

from elasticsearchdsl.

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.