diff --git a/site/search/SearchPanel.tsx b/site/search/SearchPanel.tsx index 7584ee10b3..b82696c1af 100644 --- a/site/search/SearchPanel.tsx +++ b/site/search/SearchPanel.tsx @@ -626,51 +626,53 @@ const SearchResults = (props: SearchResultsProps) => { className="search-results" data-active-filter={activeCategoryFilter} > - - - - - - - - Research & Writing - - - - - - - - + {/* This is using the InstantSearch index specified in InstantSearchContainer */} + + + + + + + Research & Writing + + + + + + + @@ -703,7 +705,11 @@ const SearchResults = (props: SearchResultsProps) => { @@ -815,7 +821,9 @@ export class InstantSearchContainer extends React.Component { // we're customizing it here to remove any filter / facet information so that it's just ?q=some+query stateMapping: { stateToRoute(uiState) { - const query = uiState[""].query + const query = + uiState[getIndexName(SearchIndexName.Pages)] + .query return { q: query, } @@ -823,7 +831,7 @@ export class InstantSearchContainer extends React.Component { routeToState(routeState) { const query = routeState.q return { - "": { + [getIndexName(SearchIndexName.Pages)]: { query: query, }, } @@ -831,6 +839,7 @@ export class InstantSearchContainer extends React.Component { }, }} searchClient={this.searchClient} + indexName={getIndexName(SearchIndexName.Pages)} >