Skip to content

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

@walterunt

Description

@walterunt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions