Skip to content
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

Merged
merged 2 commits into from
Jan 21, 2021
Merged

Elastic v7 #400

merged 2 commits into from
Jan 21, 2021

Conversation

nicpottier
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Jan 20, 2021

Codecov Report

Merging #400 (c0e47e6) into master (14be2f2) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #400   +/-   ##
=======================================
  Coverage   55.17%   55.17%           
=======================================
  Files         115      115           
  Lines        7956     7956           
=======================================
  Hits         4390     4390           
  Misses       2866     2866           
  Partials      700      700           
Impacted Files Coverage Δ
core/models/groups.go 58.44% <ø> (ø)
core/tasks/starts/worker.go 55.43% <ø> (ø)
web/server.go 57.50% <ø> (ø)
core/models/search.go 78.48% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 14be2f2...c0e47e6. Read the comment docs.

@@ -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))
Copy link
Member Author

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.

Copy link
Contributor

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.

Copy link
Member Author

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..

@nicpottier nicpottier merged commit e70571b into master Jan 21, 2021
@nicpottier nicpottier deleted the elastic-v7 branch January 21, 2021 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants