Code Monkey home page Code Monkey logo

Comments (8)

DGaffney avatar DGaffney commented on September 2, 2024 1

As it is currently written, we have an endpoint that essentially does this already - GET /claim_reviews.json has the following structure:

      {
        method: 'GET',
        params: {
          query: 'string (default none)',
          service: 'string (default none)',
          start_time: "time-parseable string (e.g. '2020-01-01' or 'Sept 20 2019', default none)",
          end_time: "time-parseable string (e.g. '2020-01-01' or 'Sept 20 2019', default none)",
          per_page: 'integer (default 20)',
          offset: 'integer (default 0)'
        }
      }

Here, we can cursor through time using the two time parameters, specify a provider using the service option, and specify a query with query, which should work fine with any valid ES-type logic query in that spot. The only one not present in here is languageCode which I agree would likely be useful. If we do this, the only thing that needs to happen is adding this language field to the query.

from check.

DGaffney avatar DGaffney commented on September 2, 2024 1

Hey, @DGaffney can you help me how to proceed as you have mentioned, I am not able to find the file with the given code. I am new to open-source, so your help will be valuable.

Hi! Glad to have you here. The code that I'm referencing will mostly need to be added over in the fetch repository. Specifically, in the lib/elastic_search_query.rb file around line 108, a new conditional clause would need to be added that'd look something like:

    if opts[:language]
      query[:query][:bool][:filter] << ElasticSearchQuery.query_match_clause('language', opts[:language])
    end

This would also probably need a few new tests as well. Does this help clarify? Happy to discuss more!

from check.

khushijindal avatar khushijindal commented on September 2, 2024

Hey @infojunkie! Can I work on this issue?

from check.

infojunkie avatar infojunkie commented on September 2, 2024

Hey @infojunkie! Can I work on this issue?

Please!

from check.

khushijindal avatar khushijindal commented on September 2, 2024

Hey, @DGaffney can you help me how to proceed as you have mentioned, I am not able to find the file with the given code. I am new to open-source, so your help will be valuable.

from check.

khushijindal avatar khushijindal commented on September 2, 2024

I would need to add new tests in the fetch/spec/lib/elastic_search_query_test.rb and fetch/spec/models/claim_review_test.rb files I suppose. @DGaffney

from check.

khushijindal avatar khushijindal commented on September 2, 2024

meedan/fetch#64
meedan/fetch#65

from check.

danielafeitosa avatar danielafeitosa commented on September 2, 2024

Closed with meedan/fetch#64 and meedan/fetch#65

from check.

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.