Giter Site home page Giter Site logo

Comments (6)

dane-stevens avatar dane-stevens commented on May 19, 2024 1

@danitseitlin any thoughts on what this should look like?

Something like:

[
  [
    {
      hash: 'movie:1001',
      title: 'Star Wars',
    }
  ],
  1
]

Could be destructured to:

const [ results, count ] = await client.search('idx:movie', '*')

from redis-modules-sdk-ts.

danitseitlin avatar danitseitlin commented on May 19, 2024

@dane-stevens Not exactly.
The problem is we're getting a complex array with items of 1-4 levels and it makes it hard + annoying to maintain.
We have 2 approaches to think about:

  1. Attempt to manipulate the output of the complex functions and build up a JS object. (the better solution)
  2. Return an actual object that holds a lot of information and has getter setter functions.

What do you think is a better solution? Got anymore ideas?
This should be thought carefully.

P. S. The person performing this task should have a good grip on the Redisearch module (or at least dive strongly into the docs)

from redis-modules-sdk-ts.

danitseitlin avatar danitseitlin commented on May 19, 2024

@dane-stevens If this is urgent for you then let me know and I'll reprioritize.

from redis-modules-sdk-ts.

dane-stevens avatar dane-stevens commented on May 19, 2024

@danitseitlin It's not a huge priority right now. I can just parse the response myself for now. I only need one or two levels at most.

from redis-modules-sdk-ts.

danitseitlin avatar danitseitlin commented on May 19, 2024

@dane-stevens I'm currently working on adding the missing Redis AI module class after that I can handle this. If you want to give this task a try feel free to assign to yourself. Any contribution is welcome! If not - I'll syc here once I'll get to it

from redis-modules-sdk-ts.

danitseitlin avatar danitseitlin commented on May 19, 2024

@dane-stevens All done :)

from redis-modules-sdk-ts.

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.