-
Notifications
You must be signed in to change notification settings - Fork 343
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 support for fuzzy case-insensitive match in PropertyRef #1383
base: master
Are you sure you want to change the base?
Conversation
05598cf
to
00cb020
Compare
class FakeEmp2ToGitHubUser(CartographyRelSchema): | ||
target_node_label: str = 'GitHubUser' | ||
target_node_matcher: TargetNodeMatcher = make_target_node_matcher( | ||
{'username': PropertyRef('github_username', fuzzy_and_ignore_case=True)}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SecPrez: this will allow us to connect 2 nodes in a "fuzzy" way, lemme know if this helps
WITH i, item | ||
OPTIONAL MATCH (n0:GitHubUser) | ||
WHERE | ||
toLower(n0.username) CONTAINS toLower(item.github_username) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SecPrez this is what the final rendered query will look like
@ramonpetgrave64 - you might be not available but just cc'ing you here anyway since i think you have the most context on this kind of data model change |
@heryxpc lemme know what you think too |
00cb020
to
5a31913
Compare
Signed-off-by: Alex Chantavy <[email protected]>
Signed-off-by: Alex Chantavy <[email protected]>
e995a65
to
8c514e1
Compare
Summary
We often need to connect 2 nodes based on a fuzzy match like in #1380 (comment). This PR adds a
fuzzy_and_ignore_case
option to thePropertyRef
so that the final rendered query performs aCONTAINS
in a case-insensitive way instead of an exact match.Related issues or links
#1380
Checklist
Provide proof that this works (this makes reviews move faster). Please perform one or more of the following: