UNPKG

@newrelic/gatsby-theme-newrelic

Version:

[![Community Project header](https://github.com/newrelic/opensource-website/raw/master/src/images/categories/Community_Project.png)](https://opensource.newrelic.com/oss-category/#community-project)

18 lines (15 loc) 834 B
// Public package export (see index.js). Thin wrapper over the SearchGPT REST // client so the existing `search` import path keeps working for consumers // (e.g. the docs-website /search-results page). // // Returns the normalized hybrid-search shape: // { results, nextCursor, prevCursor, totalCount } // Each result: { id, url, title, summary, bodyHighlights, sourceLabel, score, // tags, createdDate, lastModifiedDate }. // // NOTE: this is a breaking change from the Swiftype shape ({ records: { page }} // with result.highlight.title/body). Consumers must update accordingly. import { search as searchGPT } from '../../utils/searchGPT'; const search = ({ searchTerm, sources, cursor, sort, since, until, tags }) => searchGPT({ searchTerm, sources, cursor, sort, since, until, tags }); export default search;