-
Notifications
You must be signed in to change notification settings - Fork 4
Support facetAllowlist query parameter for vertical searches #310
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
Conversation
Allows the "facetAllowlist" parameter to be set on vertical searches. This parameter specifies the subset of field IDs that are configured as facet fields that facet options should be returned for in the search response. If unspecified, all fields configured as facetable can be returned if they have data for the given query. J=WAT-4928 TEST=manual Added a query to the test-site vertical requests that returns facets. Confirmed that the facetAllowlist parameter is settable and works as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds support for the facetAllowlist query parameter to vertical searches, enabling users to specify which facet fields should be included in search responses. This enhancement allows for more targeted facet retrieval by filtering to only the specified field IDs.
- Added
facetAllowlistproperty to theVerticalSearchRequestinterface as an optional string array - Implemented query parameter processing in the search service to join the allowlist into a comma-separated string
- Created test examples demonstrating the new functionality with location-based searches
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/models/searchservice/request/VerticalSearchRequest.ts | Added facetAllowlist property to interface |
| src/infra/SearchServiceImpl.ts | Implemented query parameter handling for facetAllowlist |
| test-site/src/ts/requests/verticalRequest.ts | Added test request with facetAllowlist example |
| test-site/src/ts/index.ts | Added function to test locations vertical search |
| test-site/src/js/requests/verticalRequest.js | JavaScript version of test request |
| test-site/src/js/index.js | JavaScript version of test function |
| test-site/index.html | Added UI button for testing locations search |
| etc/search-core.api.md | Updated API documentation |
| docs/search-core.verticalsearchrequest.md | Updated documentation table |
| docs/search-core.verticalsearchrequest.facetallowlist.md | Added property-specific documentation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Pull Request Test Coverage Report for Build 18380596115Details
💛 - Coveralls |
Allows the "facetAllowlist" parameter to be set on vertical searches. This parameter specifies the subset of field IDs that are configured as facet fields that facet options should be returned for in the search response. If unspecified, all fields configured as facetable can be returned if they have data for the given query. J=WAT-4928 TEST=manual Added a query to the test-site vertical requests that returns facets. Confirmed that the facetAllowlist parameter is settable and works as expected.
* update Visitor to show visitorId max length * Support trusted publishing with OIDC (#308) J=WAT-5077 TEST=manual forked the repo to my personal git account. Verified that: - the `ci-verify-publish` script output the correct release tag - the `release` and `release:dry` scripts work as expected on a new patch, minor, major, alpha, beta, and custom version copied over the relevant changes from the forked repo. Verified that: - the `ci-verify-publish` script output the correct release tag - the `release:dry` script make the expected changes locally * Support facetAllowlist query parameter for vertical searches (#310) Allows the "facetAllowlist" parameter to be set on vertical searches. This parameter specifies the subset of field IDs that are configured as facet fields that facet options should be returned for in the search response. If unspecified, all fields configured as facetable can be returned if they have data for the given query. J=WAT-4928 TEST=manual Added a query to the test-site vertical requests that returns facets. Confirmed that the facetAllowlist parameter is settable and works as expected. * Undo version bump to 2.6.4 (#312) We have changed the release flow to be compatible with OIDC. * release: @yext/search-core@2.6.4 * Revert "release: @yext/search-core@2.6.4" This reverts commit d32e762. * release: @yext/search-core@2.6.4 * hotfix: fix release tag in trusted publishing workflow (#316) * release: v2.7.0-beta.0 * release: v2.7.0-beta.1 * chore: use reusable publish workflow (#320) * release: v2.7.0-beta.2 * release: v2.7.0 * rerun `npm i && npm run build` up to date, audited 921 packages in 1s 169 packages are looking for funding run `npm fund` for details 4 low severity vulnerabilities To address all issues (including breaking changes), run: npm audit fix --force Run `npm audit` for details. --------- Co-authored-by: Kyle Gerner <kgerner@yext.com> Co-authored-by: Kyle Gerner <49618240+k-gerner@users.noreply.github.com> Co-authored-by: anguyen-yext2 <143001514+anguyen-yext2@users.noreply.github.com> Co-authored-by: mkouzel-yext <mkouzel@yext.com> Co-authored-by: anguyen-yext2 <anguyen@yext.com>
Allows the "facetAllowlist" parameter to be set on vertical searches. This parameter specifies the subset of field IDs that are configured as facet fields that facet options should be returned for in the search response. If unspecified, all fields configured as facetable can be returned if they have data for the given query.
J=WAT-4928
TEST=manual
Added a query to the test-site vertical requests that returns facets. Confirmed that the facetAllowlist parameter is settable and works as expected.