diff --git a/gatsby-config.js b/gatsby-config.js index 81bf1d61c9..07ce53719c 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -1,6 +1,5 @@ const path = require('path'); -const queries = require('./src/utils/algolia'); const { isProduction } = require('./src/utils/utils.node'); require('dotenv').config({ @@ -157,11 +156,14 @@ const plugins = [ }, ]; +const enableAlgolia = false; if ( + enableAlgolia && process.env.ALGOLIA_ADMIN_KEY && process.env.GATSBY_ALGOLIA_APP_ID && process.env.GATSBY_ALGOLIA_SEARCH_ONLY_KEY ) { + // const queries = require('./src/utils/algolia'); plugins.push({ resolve: 'gatsby-plugin-algolia', options: { @@ -169,7 +171,7 @@ if ( apiKey: process.env.ALGOLIA_ADMIN_KEY, enablePartialUpdates: true, matchFields: ['title', 'slug', 'content', 'excerpt', 'heading'], - queries, + // queries, chunkSize: 10000, // default: 1000 }, }); diff --git a/src/components/shared/search-box/search-box.view.js b/src/components/shared/search-box/search-box.view.js index dc68e5d256..9beb14056d 100644 --- a/src/components/shared/search-box/search-box.view.js +++ b/src/components/shared/search-box/search-box.view.js @@ -54,7 +54,9 @@ const Stats = connectStateResults( ); export const SearchBox = ({ inputLabel, indices }) => { + const enableAlgolia = false; if ( + !enableAlgolia || !process.env.GATSBY_ALGOLIA_APP_ID || !process.env.GATSBY_ALGOLIA_SEARCH_ONLY_KEY ) {