Giter Club home page Giter Club logo

Comments (8)

tsibley avatar tsibley commented on August 23, 2024

++

You could also use a filtered query if you want the filters to apply to faceting, but I'm guessing MetaCPAN::Client doesn't do faceting.

from metacpan-client.

mickeyn avatar mickeyn commented on August 23, 2024

i remember Sawyer added support for facets (through extra params) but I need to check and add a test for it :)

from metacpan-client.

oalders avatar oalders commented on August 23, 2024

Even outside of faceting, since most queries we run won't require scoring, the filtered query should be the faster way to go.

from metacpan-client.

mickeyn avatar mickeyn commented on August 23, 2024

@tsibley @oalders: cool, i see what my evening is going to be about ;)
thanks for the tips πŸ‘

from metacpan-client.

tsibley avatar tsibley commented on August 23, 2024

@oalders Huh... are you implying that:

{
   "query" : {
      "match_all" : {}
   },
   "filter" : { ... }
}

is slower than

{
   "query" : {
      "filtered" : {
         "query" : {
            "match_all" : {}
         },
         "filter" : { ... }
      }
   }
}

? That'd be surprising to me!

from metacpan-client.

oalders avatar oalders commented on August 23, 2024

@tsibley No, I'm just reiterating the "Filters can be much faster compared to queries since they don’t perform any scoring, especially when they are cached." from the docs and that it would be nice to be able to filter a query. The filter vs filtered part makes this confusing to talk about.

from metacpan-client.

tsibley avatar tsibley commented on August 23, 2024

@oalders Ah, okay! It is indeed confusing to talk about.

from metacpan-client.

mickeyn avatar mickeyn commented on August 23, 2024

this should be possible in last few releases. closing.
thanks all for the fruitful discussion.

from metacpan-client.

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.