Skip to content

Not to use trigrams when filtering by regexp #2565

@makitka2007

Description

@makitka2007

it's strange that for using regexp expression in filter section, still need to create trigram index.
it's just filtering on already fetched data, not a search by some condition. when using it in filter section, it makes sense just to apply regular expression to a string value and filter out values that don't match.

as for now, trigram index is needed, so need additional space to store it, and, what's more important, is not possible to use regular expressions like "^f.*" to keep values starting with "f" letter only. whereas all nodes are already found by outcoming edges from some other node.

i found 1 workaround to add 2 junk letters to every string value i need to filter with "start with" condition, so "^f.*" condition becomes "^AAf.*". it works but looks real ugly

so, why not using regular "regexp" go function when processing regular expression in "filter" section, and use trigram index when use it in "func" one?

Metadata

Metadata

Assignees

Labels

exp/intermediateFixing this requires some experience with the project.kind/featureSomething completely new we should consider.priority/P3Low priority, something to be done once everything else seems fixed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions