Giter Site home page Giter Site logo

Comments (3)

sudo-suhas avatar sudo-suhas commented on May 18, 2024

Could you share more details on your env? I am not able to reproduce the error with the following:

new esb.BoolQuery()
    .should([
        new esb.MultiMatchQuery(['field1', 'field2'], 'search_str')
            .type('cross_fields')
            .operator('and')
    ])

Output:

{
  "bool": {
    "should": {
      "multi_match": {
        "query": "search_str",
        "fields": ["field1", "field2"],
        "type": "cross_fields",
        "operator": "and"
      }
    }
  }
}

You can test this here - https://elastic-builder.js.org/.

Since the error is not being reproduced with a clean env, I can only guess that it has to with the way elastic-builder is being used in your project.

from elastic-builder.

dkswjdals89 avatar dkswjdals89 commented on May 18, 2024

I'm sorry. I checked and there's no error running the actual code.
But strangely, my test code will cause errors.

When I check some things, if I use the should.js library, an error occurs.
should.js is one of the assertion libraries.

Maybe it was caused by an impact on the should.js library.

I registered the issue because of an error in the test code I wrote, but I didn't think it would be because it was affected by a third-party library.

I'm sorry and thank you!
I'll close the issue.

from elastic-builder.

sudo-suhas avatar sudo-suhas commented on May 18, 2024

I can't find any relevant blog post regarding this but I recall having read somewhere that should.js does something unexpected for methods named should. Thanks for responding and closing the issue.

from elastic-builder.

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.