Skip to content

Commit

Permalink
fix(core): export all weighted search functions and types
Browse files Browse the repository at this point in the history
  • Loading branch information
robinpyon committed Jun 26, 2023
1 parent f7be6b2 commit 2f1edfb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 2 additions & 8 deletions packages/@sanity/base/src/search/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ import {versionedClient} from '../client/versionedClient'
import {getSearchableTypes} from './common/utils'
import {createWeightedSearch} from './weighted/createWeightedSearch'

export type {
SearchOptions,
SearchSort,
SearchTerms,
SearchableType,
WeightedHit,
} from './weighted/types'

// Use >= 2021-03-25 for pt::text() support
const searchClient = versionedClient.withConfig({
apiVersion: '2021-03-25',
Expand All @@ -23,3 +15,5 @@ export default createWeightedSearch(getSearchableTypes(schema), searchClient, {
unique: true,
tag: 'search.global',
})

export * from './weighted'
2 changes: 2 additions & 0 deletions packages/@sanity/base/src/search/weighted/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export {createWeightedSearch} from './createWeightedSearch'
export {createSearchQuery} from './createSearchQuery'
export * from './types'

0 comments on commit 2f1edfb

Please sign in to comment.