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

Add option to disable Field Suggestions since LexicalDistance Constructor takes Too Long for Unknown Field-Names #4190

Closed
walterunt opened this issue Sep 12, 2024 · 1 comment

Comments

@walterunt
Copy link

walterunt commented Sep 12, 2024

If someone sends a simple query with a very long unknown/invalid fieldname (e.g. millions of characters), the validation rule FieldsOnCorrectTypeRule takes very long. This may lead to a lot of unecessary processing power wasted, when not used.

See also files:

It looks like that the LexicalDistance calculation constructor is very slow when generating the _inputArray and _rows members, if the fieldname is very long.

Example Query (e.g. the content is several MB big (e.g. 40mb)): {"query":"{ unknownfield_unknownfield_...unknownfield}"}.

This all comes in place, when calculating suggestions for fields.

Please make an option to completely disable the suggestion calculation, i.e. do not perform the calculation at all if an option is set.

I have found similar issues:

but it looks like that the calculation is still in place, when the DisableSuggestion plugin is activated.

@walterunt walterunt changed the title Add option to disable Field Suggestions since LexicalDistance Calculation takes Too Long for Unknown Field-Names Add option to disable Field Suggestions since LexicalDistance Constructor takes Too Long for Unknown Field-Names Sep 12, 2024
@JoviDeCroock
Copy link
Member

This will be implemented in v17 and has been in #4214

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

No branches or pull requests

2 participants