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

Feature/threshold calc #909

Draft
wants to merge 9 commits into
base: feature/thresholding
Choose a base branch
from

Conversation

ciaranschutte
Copy link
Contributor

  • change name of env var "enabled document hits" to "enable show records"
  • add second conditional hits resolution which uses the aggregations calculation
  • apply data masking of <threshold value> to doc_count
  • conditionally add property belowThreshold property to aggregations.buckets

@ciaranschutte ciaranschutte changed the base branch from main to feature/thresholding November 25, 2024 12:48
* Popular parsing `info` libs do not include these operations properties
*/
const typeNameConnectionProperty = info.operation.selectionSet.selections[0];
const isAggregationsQueried = typeNameConnectionProperty.selectionSet.selections.some(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if aggregations field is queried also, pull out the variables and call the aggregation resolving code, then resolve hits from the result.

the aggregation resolver code can be memoized so it's only called once. better than sharing potentially huge objects over context

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.

1 participant