Skip to content

insights: add aggregation `Available` and `ReasonUnavailable` functionality

Administrator requested to merge leo/aggregation-modes into main

Created by: leonore

part of #40418, capture group aggreg availability pending

Test plan

Added unit tests API console testing loom: https://loom.com/share/e7320b296b7945bfb2def962e69b5c3c Queries used:

query searchQueryAggregate {
  searchQueryAggregate(query: "test context:global", patternType: literal) {
    aggregations(mode: AUTHOR, limit: 10) {
      __typename
      ... on ExhaustiveSearchAggregationResult {
        groups {
          label
          count
          query
        }
        otherResultCount
        otherGroupCount
      }
      ... on SearchAggregationNotAvailable {
        reason
      }
    }
  }
}
query searchQueryAggregate {
  searchQueryAggregate(query: "test context:global", patternType: literal) {
    modeAvailability {
      mode
      available 
      reasonUnavailable
    }
  }
}

Merge request reports

Loading