Giter VIP home page Giter VIP logo

Comments (4)

mfrasco avatar mfrasco commented on May 22, 2024 3

Those are great points. Thanks for explaining.

from uptasticsearch.

austin3dickey avatar austin3dickey commented on May 22, 2024

Sounds good, though we should clarify that in the docs too.

from uptasticsearch.

mfrasco avatar mfrasco commented on May 22, 2024

Do you think that there should be a .ValidateAndFormatIndex function? What about validation on trailing_args and query_body?

Is the problem with allowing a user to pass NULL as the index that the resulting query might take a very long time, since it is searching over all indexes?

from uptasticsearch.

jameslamb avatar jameslamb commented on May 22, 2024

@mfrasco I'm not a .ValidateAndFormatIndex is right for this particular issue. Not passing an index is "valid".

I also want to avoid validating queries because the query DSL changes radically from major ES version to major ES version. We've explicitly tried to keep the scope of this project to the execution or requests and parsing of results.

My concern isn't explicitly that the query will take too long, since the query-all-indices use case should definitely be something we support. My thinking is that allowing NULL means that you can find yourself in that world silently. Forcing people to use "_all" is safer.

FWIW I hit this when I was trying to subset into the output from get_fields() then pipe the result of that to es_host. I wrote a bad subset condition which silently evaluated to NULL, and then noticed in the log that es_search was trying to pull WAY more data than I expected.

from uptasticsearch.

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.