Skip to content

Commit

Permalink
feat(sanity): add bundlePerspective support to Text Search API sear…
Browse files Browse the repository at this point in the history
…ch strategy
  • Loading branch information
juice49 committed Aug 30, 2024
1 parent b76c453 commit 81d67bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/sanity/src/core/search/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ export type TextSearchParams = {
*/
order?: TextSearchOrder[]
perspective?: string
bundlePerspective?: string
}

export type TextSearchResponse<Attributes = Record<string, unknown>> = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export const createTextSearch: SearchStrategyFactory<TextSearchResults> = (

const textSearchParams: TextSearchParams = {
perspective: searchOptions.perspective,
bundlePerspective: searchOptions.bundlePerspective,
query: {
string: getQueryString(searchTerms.query, searchOptions),
},
Expand Down

0 comments on commit 81d67bc

Please sign in to comment.