-
Notifications
You must be signed in to change notification settings - Fork 29
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
🔎 Search by UUID #297
🔎 Search by UUID #297
Conversation
@@ -172,7 +172,7 @@ func conditionToElasticQuery(env envs.Environment, resolver contactql.Resolver, | |||
|
|||
// if we are looking for unset, inverse our query | |||
if c.Comparator() == contactql.ComparatorEqual { | |||
query = elastic.NewBoolQuery().MustNot(query) | |||
query = not(query) |
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.
unrelated.. just added a util method below to reduce some repetition
} else if key == contactql.AttributeID { | ||
if c.Comparator() == contactql.ComparatorEqual { | ||
return elastic.NewIdsQuery().Ids(value), nil | ||
} else if c.Comparator() == contactql.ComparatorNotEqual { | ||
return not(elastic.NewIdsQuery().Ids(value)), nil |
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.
I noticed the goflow side allows !=
for everything so thinking that's fine and allow it for id
and uuid
.. lets users exclude contacts from larger queries.. assuming this performs ok in elastic?
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.
Yes, don't think there should be any issues there.
Codecov Report
@@ Coverage Diff @@
## master #297 +/- ##
==========================================
+ Coverage 53.54% 53.57% +0.02%
==========================================
Files 101 101
Lines 8904 8914 +10
==========================================
+ Hits 4768 4776 +8
- Misses 3438 3440 +2
Partials 698 698
Continue to review full report at Codecov.
|
} else if key == contactql.AttributeID { | ||
if c.Comparator() == contactql.ComparatorEqual { | ||
return elastic.NewIdsQuery().Ids(value), nil | ||
} else if c.Comparator() == contactql.ComparatorNotEqual { | ||
return not(elastic.NewIdsQuery().Ids(value)), nil |
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.
Yes, don't think there should be any issues there.
Support sending documents for Telegram
No description provided.