且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何为一个简单的网站设置一个简单的网站搜索?

更新时间:2022-02-22 07:50:39

冒着听起来完全是自我推销以及向您推送另一个 API 的风险,我写了一个 博文关于使用 jQuery 为您的网站实施 Bing.

At the risk of sounding completely self-promoting as well as pushing yet another API on you, I wrote a blog post about implementing Bing for your site using jQuery.

使用 jQuery 方法的优势在于,您可以根据传递给 API 的过滤器非常具体地调整结果,并使用 Bing 返回的 JSON(或 XML/SOAP,如果您愿意)结果,以及具有能够更有选择性地选择您实际拥有 jQuery 显示的数据.

The advantage in using the jQuery approach is that you can tune the results quite specifically based on filters passed to the API and playing around with the JSON (or XML / SOAP if you prefer) result Bing returns, as well as having the ability to be more selective about what data you actually have jQuery display.

您可能应该注意的另一件事是如何有效地使用 @rel 属性,以便搜索引擎知道关系存在于他们正在抓取的实际内容与其链接到的目标内容之间.

The other thing you should probably be aware of is how to effectively use @rel attributes on your content (esp. links) so that search engines are aware of what the relationship is between the actual content they're crawling and the destination content it links to.