-
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
Elastic v7 #400
Elastic v7 #400
Conversation
Codecov Report
@@ Coverage Diff @@
## master #400 +/- ##
=======================================
Coverage 55.17% 55.17%
=======================================
Files 115 115
Lines 7956 7956
=======================================
Hits 4390 4390
Misses 2866 2866
Partials 700 700
Continue to review full report at Codecov.
|
@@ -77,7 +77,7 @@ func ContactIDsForQueryPage(ctx context.Context, client *elastic.Client, org *Or | |||
return nil, nil, 0, errors.Wrapf(err, "error parsing sort") | |||
} | |||
|
|||
s := client.Search("contacts").Routing(strconv.FormatInt(int64(org.OrgID()), 10)) | |||
s := client.Search("contacts").TrackTotalHits(true).Routing(strconv.FormatInt(int64(org.OrgID()), 10)) |
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.
Without this we may get "estimates" on the total # of hits. This forces true counts.
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.
Interesting - I wonder what the performance differences are. Could be useful in scenarios like the flow start modal where we could give users an estimate.
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.
It doesn't really give an estimate, rather it'll return something like "> 10,000", ie, stop counting at a particular point. But ya, for the case of gathering the union of contacts in groups elastic is probably pretty great. The real challenge with that dialog is which contacts are active in what flows and which have already participated etc..
No description provided.