Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block hashes on HSET that don't match the schema of all indices (>=v2) #1455

Open
K-Jo opened this issue Aug 24, 2020 · 5 comments
Open

Block hashes on HSET that don't match the schema of all indices (>=v2) #1455

K-Jo opened this issue Aug 24, 2020 · 5 comments

Comments

@K-Jo
Copy link
Collaborator

K-Jo commented Aug 24, 2020

As a module configuration and on an index level.
SCHEMA_MISMATCH_POLICY

Options:

  • SKIP current behaviour
  • PARTIAL index fields that do match
  • BLOCK error on write (HSET)

Note, this could mean we would need a command hook which will introduce a performance degradation

@K-Jo K-Jo added the c:idea label Aug 24, 2020
@gkorland gkorland added this to To do in 2.2 Sep 30, 2020
@K-Jo K-Jo added c:enhancement and removed c:idea labels Dec 4, 2020
@rafie rafie removed this from To do in 2.2 Mar 1, 2021
@mikeblum
Copy link

This would help with imperfect data tied to each hash - otherwise i need bespoke indexes or extra logic around what can be added to the index in terms of document to get a 💯 % index of every document.

@thotakst
Copy link

Partial indexing would be really helpful as finding the exact field that is failing is complex for very large sets of data.

@ashtul
Copy link
Contributor

ashtul commented Aug 25, 2021

Related to Partial index 2.0 (#1462)

@oshadmi
Copy link
Collaborator

oshadmi commented Jun 23, 2022

There could be another option for SCHEMA_MISMATCH_POLICY, such as a CONVERT option, which will allow to define conversions for specific mismatches, e.g., allowing one or more fields to accept, let's say a numeric value, by converting it to a string, etc. (whether there are built-in conversions, lua-scripts, or functions)

@neeleshs
Copy link

This is a super important feature. Without at least an option to BLOCK error on write (HSET), the clients have no way of knowing indexing this particular doc has failed. hash_indexing_failure counts are unreliable and dont tell which keys failed and thus no way to recover, other than fully rebuilding the index. Productionalizing Redisearch with silent indexing failures is next to impossible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Backlog
Awaiting triage
Development

No branches or pull requests

6 participants