Google Custom Search Improvement is not redirected to another website.

I am using Google Custom Search and trying to use Refinement to redirect search queries to other websites.

I follow the example https://developers.google.com/custom-search/docs/refinements#redirect , but it does not work.

When I click on the refinement link (tab), instead of redirecting, it just shows "No results" on the same page.


Here is my XML CSE Context code:

<?xml version="1.0" encoding="UTF-8" ?> <CustomSearchEngine id="<my_search_engine_id>" creator="<my_creator_id>" language="en" encoding="UTF-8" enable_suggest="true"> <Title>my.domain.name</Title> <Context> <Facet> <FacetItem title="Google Scholars"> <Label name="google_scholars" mode="FILTER"/> <Redirect url="http://scholar.google.com/scholar?q=$q"/> </FacetItem> </Facet> <BackgroundLabels> <Label name="_cse_4zii28iwa6o" mode="FILTER" /> <Label name="_cse_exclude_4zii28iwa6o" mode="ELIMINATE" /> </BackgroundLabels> </Context> <LookAndFeel nonprofit="false" element_layout="8" theme="7" custom_theme="true" text_font="Arial, sans-serif" url_length="full" element_branding="show" enable_cse_thumbnail="true" promotion_url_length="full" ads_layout="1"> <Logo /> <Colors url="#008000" background="#FFFFFF" border="#FFFFFF" title="#0000CC" text="#000000" visited="#0000CC" title_hover="#0000CC" title_active="#0000CC" /> <Promotions title_color="#0000CC" title_visited_color="#0000CC" url_color="#008000" background_color="#FFFFFF" border_color="#336699" snippet_color="#000000" title_hover_color="#0000CC" title_active_color="#0000CC" /> <SearchControls input_border_color="#D9D9D9" button_border_color="#666666" button_background_color="#CECECE" tab_border_color="#E9E9E9" tab_background_color="#E9E9E9" tab_selected_border_color="#FF9900" tab_selected_background_color="#FFFFFF" /> <Results border_color="#FFFFFF" border_hover_color="#FFFFFF" background_color="#FFFFFF" background_hover_color="#FFFFFF" ads_background_color="#FDF6E5" ads_border_color="#FDF6E5" /> </LookAndFeel> <AdSense /> <EnterpriseAccount /> <ImageSearchSettings enable="true" /> <autocomplete_settings /> <sort_by_keys label="Relevance" key="" /> <sort_by_keys label="Date" key="date" /> <cse_advance_settings enable_speech="true" enable_facet_search="true" /> </CustomSearchEngine> 
+2
source share
2 answers

Finally, I received a response from the Google Enterprise Support Team (August 4, 2014) as follows:

β€œNo, this function is currently not supported and there are no plans to implement this function in the near future. We will update the documentation that this function is not supported in custom search for the element code.

You can use the XML API to get results in XML, customize and display to end users according to your requirements. "

+1
source

Follow this guide, it will solve your problem.

https://support.google.com/customsearch/answer/2631064?hl=en

0
source

Source: https://habr.com/ru/post/1263860/


All Articles