Remove instant search query from url

i wanted to remove instant search query from url.
can i?
like-----#q=dia&idx=magento_default_products&p=0&is_v=1
URL should not be added in url bar after search
i want remove after # part

Hi,

To do that you need to remove the urlSync from instantsearch. Be aware that this will prevent you from refreshing the page and getting back the search in the same state.

If you are using magento1, remove the following lines: algoliasearch-magento/instantsearch.js at bf5aa0df2e1440f0a551ce6bd1c6c6dbd5546637 · algolia/algoliasearch-magento · GitHub

If you are using magento2, remove the following lines: algoliasearch-magento-2/instantsearch.js at 97c74fb2a51cbf7b5046e1065dcc191e69a7977c · algolia/algoliasearch-magento-2 · GitHub

       const { connectClearRefinements } = algoliaBundle.instantsearch.connectors;
        // Create the render function
       const renderClearRefinements = (renderOptions, isFirstRender) => {
       const { canRefine, refine, widgetParams } = renderOptions;
              $(document).on('click', '#clearAllButton', (ev) => {
                widgetParams.container.value = '';
                search.helper.state.query = '';
                refine('');
                ev.stopPropagation();
              });
        };

        // Create the custom widget
        const customClearRefinements = connectClearRefinements(
          renderClearRefinements
        );

        // Instantiate the custom widget
        search.addWidgets([
          customClearRefinements({
            container: document.querySelector('#search'),
            includedAttributes: []
          })
        ]);

This will clear all queries from the URL…