redis-developer / redis-developer/redis-vl-typescript

Log a warning when `path` is supplied on HASH storage

Open Beginner friendly
#12 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
Dominant language
TypeScript
Stars
1
Forks
3
Avg merge
34m
Merged PRs (30d)
3

Description

IndexSchema.makeField currently has a silent TODO:

// src/schema/schema.ts:206
} else {
    // For HASH storage, path should always be null
    if (path !== null && path !== undefined) {
        // TODO: log a warning
    }
    field.path = null;
}

Users who set a JSON path on a HASH-storage field get their value silently dropped. A warning would surface the misconfiguration.

Acceptance criteria
  • Warn (via console.warn or a logger if one is introduced) when a non-empty path is supplied for a HASH-storage field.
  • Include the field name and the storage type in the warning.
  • Unit test covering the warning surface.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/schema/schema.ts:206 in IndexSchema.makeField and inspect the existing HASH-storage path handling. Add coverage to the relevant unit tests for a non-empty path, checking that the warning includes the field name and storage type; also verify that empty or absent paths do not warn. Done means the misconfiguration is surfaced without changing the existing null path behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.