Skip to content

Commit

Permalink
chore: switch to algoliasearch v5
Browse files Browse the repository at this point in the history
  • Loading branch information
barjin committed Jan 14, 2025
1 parent a2ad115 commit 050bc99
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions apify-docs-theme/src/theme/SearchPage/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* eslint-disable */
import React, { useEffect, useReducer, useRef, useState } from 'react';
import clsx from 'clsx';
import { liteClient } from 'algoliasearch/lite';
import algoliaSearchHelper from 'algoliasearch-helper';
import algoliaSearch from 'algoliasearch/lite';
import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment';
import Head from '@docusaurus/Head';
import { useAllDocsData } from '@docusaurus/plugin-content-docs/client';
Expand Down Expand Up @@ -117,7 +117,6 @@ function SearchPageContent() {
const {
algolia: { appId, apiKey, indexName },
} = useAlgoliaThemeConfig();
const processSearchResultUrl = useSearchResultUrlProcessor();
const documentsFoundPlural = useDocumentsFoundPlural();
const docsSearchVersionsHelpers = useDocsSearchVersionsHelpers();
const [searchQuery, setSearchQuery] = useSearchQueryString();
Expand Down Expand Up @@ -167,7 +166,7 @@ function SearchPageContent() {
},
initialSearchResultState,
);
const algoliaClient = algoliaSearch(appId, apiKey);
const algoliaClient = liteClient(appId, apiKey);
const algoliaHelper = algoliaSearchHelper(algoliaClient, indexName, {
hitsPerPage: 15,
advancedSyntax: true,
Expand Down

0 comments on commit 050bc99

Please sign in to comment.