Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WEBDEV-5328 Integrate search service with beta search backend (#16)
* Add new backends * Remove fetchMetadata * Add hit types * Clean up minor doc issues * Reinstate fetchMetadata for sake of testing * Add schema for search hits * Default to new metadata search * Adjust response modeling to conform to new backend * Toy with decoupling SearchService from its backends * Clean up imports * Abstract out shared search backend methods/options * Clean up type imports * Improve documentation * Add hit factory and merge type for hits * Organize hit properties * Conform search response details to PPS shape * Fix Hit type alias quirks * Add mediatype field to text hits * Update mock response factory * Add search request model * Document search backends * Improve type safety of search response details * Excise metadata fetching (now in separate service) * Update search request params * Update demo app with search type options * Remove leftover fetchMetadata bits from tests * Collapse responses directory * Fix tests and formatting * Add additional tests for new backends * Add unit tests for search response details * Avoid blank titles in demo * Better organize backend tests * Rename default-search-backend and update package exports * Add hit-type tests and fix boolean fields * Update sort params to PPS expected format * Toggle unhelpful eslint rules * Update README and version * Further clarify usage in README * Add sort options to demo * Address eslint complaints * Remove old advanced_search backend * Add 'omit' option to aggregation params * Fix demo app sort button * Formatting: missed a semicolon * Memoize search backends to avoid redundancy * Include page_type and page_target params * Better document search params * Make new params optional, fix formatting * Update URL param keys to PPS expectations * Add tests for page_type and page_target params * Add unit test for omitting aggregations * Add additional unit tests for hit types * Add aggregations to demo app * Formatting * Update obsolete documentation to refer to PPS * Add FTS snippets to demo app * Fix bug disallowing falsey search params * Update obsolete documentation to refer to PPS * Formatting * Clean up snippet return types in demo app * Add a demo app field for setting # rows to fetch * Add aggregations_size param to requests and demo app * Remove extra .ts extension on base-search-backend * Move backend factory method onto SearchService * Rename SearchBackendOptions(Interface) * Prevent empty page_type and page_target * Better document search parameters * Clarify doc wording around search URL generation * Remove empty search service constructor * Move backend factory tests over to search service * Add more documentation & clarifications * Remove unavailable search types from the enum * Rename some hit-related types/properties for clarity * Simplify result type definition * Clarify test descriptions * Ensure error is not thrown for invalid hit types * Improve search param docs * Add more documentation around search params & schemas * Improve documentation for search service interface * Improve documentation for text/item hits * Better document aggregations_size param * Format doc comments more prettily * Add test for aggregations_size * Move result factory method to SearchResponseDetails * Refer to Metadata types in hit models * Revert rawMetadata to explicit type * Clean up type imports * Add a breakdown of the search params to the README * Normalize some search response properties to camel case * Add README sections documenting search params and responses * Adjust README for clarity * Rename Result to SearchResult to avoid overlap with Result<T, E> * Formatting * Add sorting method for aggregations * Make aggregations immutable * Correctly construct SearchRequest object * Specify aggregation options type * Better document aggregation sort options * Remove trailing whitespace * Log debugging info if it is present on the response * Add debugging checkbox to demo app * Move demo app queries into private fields * Make debug info logs easier to navigate * Document logging method and avoid errors on missing fields * Add unit tests for debugging output * Export AggregationSortType * Add unit test for backend options * Export search backend options interface * Add unit tests for service path param * Update lit to modern version (for demo app) * Better organized backend tests * v0.4.0
- Loading branch information