Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Is it possible to use an XML file to force Google's Custom Search to suggest only the terms in the XML?

share|improve this question

migrated from programmers.stackexchange.com Aug 22 '13 at 0:00

This question came from our site for professional programmers interested in conceptual questions about software development.

add comment

1 Answer

up vote 2 down vote accepted

After an extensive search...it doesn't seem possible to exclude terms found in your site and search queries from appearing in Google's Custom Search Engine autocomplete.

You might however look at providing a front-end to the search form using something like jQuery Autocomplete, and disabling the autocomplete option in Custom Search. Then you can populate the autocomplete list with your own specific autocomplete terms.

share|improve this answer
    
Thank you Dan. I searched extensively myself and was surprised that this 'feature' wasn't part of Google CSE. I guess my only concern would be how to redirect the search to Google, it should be doable I believe? –  Marin Aug 24 '13 at 20:48
    
You're welcome! Yes, it should be doable - search for "Google Custom Search jQuery autocomplete" or similar. This is a bit on the older-side, but I've seen it referenced in recent posts so it might be helpful. You can also post a question in the Google Group for Custom Search for feedback/experience on how to do it. If you find a good resource or approach, update the question to let others know. Good luck! –  dan Aug 24 '13 at 22:52
1  
ACtually I got it done right after you told me ! Thanks for pushing me in the right direction as google's documentation unfortunately was not clear enough. I ended up not using google custom search but another search functionality webSearch.setSiteRestriction() which when coupled with jQuery autoComplete worked out great. –  Marin Aug 25 '13 at 14:09
    
Great - thanks for the update! –  dan Aug 25 '13 at 17:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.