internetarchive / iaux-search-service

GNU Affero General Public License v3.0
4 stars 2 forks source link

WEBDEV-5797 Add `caching` and `verbose` options #31

Closed latonv closed 1 year ago

latonv commented 1 year ago

This PR adds support for the caching and verbose options on search service backend instances.

The caching option indicates flags for the PPS to modify how the request interacts with the cache. The verbose option indicates whether all responses from the backend should be logged to the console (with some elements truncated, such as the hits array and aggregation buckets).

Both options are passed through automatically from the page URL if present and not otherwise specified.

github-actions[bot] commented 1 year ago

PR Preview Action v1.2.0 :---: Preview removed because the pull request was closed. 2023-01-27 04:22 UTC

codecov[bot] commented 1 year ago

Codecov Report

Merging #31 (4431177) into main (d95dc6f) will increase coverage by 1.59%. The diff coverage is 93.57%.

@@            Coverage Diff             @@
##             main      #31      +/-   ##
==========================================
+ Coverage   85.14%   86.73%   +1.59%     
==========================================
  Files          26       26              
  Lines        2417     2511      +94     
  Branches      111      122      +11     
==========================================
+ Hits         2058     2178     +120     
+ Misses        347      321      -26     
  Partials       12       12              
Impacted Files Coverage Δ
src/search-backend/base-search-backend.ts 88.78% <90.00%> (+2.62%) :arrow_up:
src/models/aggregation.ts 100.00% <100.00%> (+30.20%) :arrow_up:
src/search-service.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.