Function: useGraphSearch()
useGraphSearch(
searchOption
?):object
Defined in: packages/graph-search/src/useGraphSearch.tsx:15
Hooks that returns a function to search in the graph index.
This hook must be used in a component that is a descendant of GraphSearchContextProvider
.
Parameters
searchOption?
SearchOptions
Options passed to the minisearch search function. Per default we use { prefix: true, fuzzy: 0.2, boost: { label: 2 } }
Returns
object
search()
search: (
query
,type
?) =>Promise
<GraphSearchOption
[]>
Parameters
query
string
type?
Returns
Promise
<GraphSearchOption
[]>