skip to Main Content

I got error saying "ReplyError: Car:index: no such index". I am indexing by "description". As you can see on the terminal part contains all the needed info and I am not sure what is causing the problem. Help is welcome.

enter image description here
I’ve been trying to follow Fireship tutorial on Redis, copied his code https://fireship.io/lessons/redis-nextjs/

2

Answers


  1. Chosen as BEST ANSWER

    As Guy Royse mentioned in the comments - The problem is solved by calling createIndex API.


  2. In Redis-om version 0.3.6, you can add following code in your API:

    export async function createIndex() {
      await connect();
      const repository = client.fetchRepository(schema);
      await repository.createIndex();
    }
    

    And Also ensure you only create index once ONLY.

    It will work after you created an index.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search