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

Validate paths used for indexing options for CreateCollection #790

Closed
tatu-at-datastax opened this issue Jan 11, 2024 · 0 comments · Fixed by #804 or #805
Closed

Validate paths used for indexing options for CreateCollection #790

tatu-at-datastax opened this issue Jan 11, 2024 · 0 comments · Fixed by #804 or #805
Assignees

Comments

@tatu-at-datastax
Copy link
Contributor

Currently the only validation done for indexing options of CreateCollections is to make sure that only one of arrays ("allow", "deny") is non-empty.

But we should be able to further validate that all paths included are valid paths for JSON API, same as we do for paths used for shredding and filtering.

For example, currently user could use:

"indexing" : {
   "deny" : [ "_id", "data*" ]
}

expecting data* to be regexp used: it won't and we'd take that to refer to hypothetical value like:

{
   "data*" : 42 
}

but we do NOT allow such properties to be used (character '*' not allowed in path segments).

Adding validation would prevent users from creating Indexing settings that cannot work as intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant