搜尋結果頁面推出改良版搜尋框
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
2014年9月23日星期二
原文:
An improved search box within the search results
作者:Mariya Moeva, Webmaster Trends Analyst; Kaylin Spitz, Software Engineer
網站連結搜尋框經過改良,現已全新上線。如果您在搜尋結果網頁上提供這項工具,使用者就可直接經由站內搜尋網頁,輕鬆找到網站上的特定內容。
搜尋框是什麼,何時會在我的網站上顯示?
當使用者透過 [
Megadodo Publications
] 或 [
Dunder Mifflin
] 這樣的公司名稱來執行搜尋,實際要找的可能是該公司網站上的特定內容。以前我們的演算法發現這點時,會顯示一大堆
網站連結
並在搜尋結果下方附上搜尋框,方便使用者直接在搜尋結果網頁執行
site: 搜尋
(例如 [
site:example.com 搭車指南
]),搜尋該網站的內容。
現在這個搜尋框換到更顯眼的位置 (位於網站連結上方),而且還支援
自動完成功能
。只要您使用正確的標記,就能將使用者直接導向網站內部的搜尋網頁。
如何標記我的網站?
只要在網站上實作這個標記,使用者就能透過網站連結搜尋框,直接前往您的站內搜尋結果頁面。如果 Google 沒有偵測到任何標記,則會按照一般處理方式,只顯示 site: 查詢的相關搜尋結果網頁。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2014-09-01 (世界標準時間)。
[null,null,["上次更新時間:2014-09-01 (世界標準時間)。"],[[["\u003cp\u003eGoogle has launched an improved sitelinks search box, displayed above sitelinks, enabling users to search specific content within a website directly from Google Search results.\u003c/p\u003e\n"],["\u003cp\u003eThe sitelinks search box appears when users search for a company or website name, indicating an intent to find something specific on that site.\u003c/p\u003e\n"],["\u003cp\u003eWebsite owners with a site-specific search engine can implement schema.org/SearchAction markup on their homepage to direct users from the sitelinks search box to their own search results.\u003c/p\u003e\n"],["\u003cp\u003eIf the markup is not implemented, Google will display a regular Google Search results page for a site: query.\u003c/p\u003e\n"],["\u003cp\u003eCommon implementation issues include ensuring the search query URL is valid and that the query-input field matches the target field's search term parameter.\u003c/p\u003e\n"]]],["The document discusses an enhanced sitelinks search box feature for websites. When users search for a company, a prominent search box may appear above sitelinks. Website owners can enable users to search their site directly from this box by implementing specific markup on their homepage, using `schema.org/WebSite` and `schema.org/SearchAction`. This markup, using JSON-LD, microdata, or RDFa, directs users to the site's search results page. Proper URL formatting and `query-input` field alignment in the markup are crucial for correct functionality. The old sitelink search box is no longer available.\n"],null,["# An improved search box within the search results\n\nFriday, September 05, 2014\n| It's been a while since we published this blog post. Some of the information may be outdated (for example, some images may be missing, and some links may not work anymore). The [sitelinks search box feature is no longer available](/search/blog/2024/10/sitelinks-search-box).\n\n\nToday you'll see a new and improved sitelinks search box. When shown, it will make it easier for\nusers to reach specific content on your site, directly through your own site-search pages.\n\nWhat's this search box and when does it appear for my site?\n-----------------------------------------------------------\n\n\nWhen users search for a company by name---for example, \"Megadodo Publications\" or\n\"Dunder Mifflin\"---they may actually be looking for something specific on that website. In the\npast, when our algorithms recognized this, they'd display a larger set of\n[sitelinks](/search/docs/appearance/sitelinks) and an additional search box\nbelow that search result, which let users do\n[`site:` searches](/search/docs/monitor-debug/search-operators/all-search-site)\nover the site straight from the results, for example `site:example.com hitchhiker guides`.\n\n\nThis search box is now more prominent (above the sitelinks), supports\n[Autocomplete](https://support.google.com/websearch/answer/106230),\nand---if you use the right markup---will send the user directly to your website's own\nsearch pages.\n\nHow can I mark up my site?\n--------------------------\n\n\nYou need to have a working site-specific search engine for your site. If you already have one, you\ncan let us know by marking up your home page as a\n[schema.org/WebSite](https://schema.org/WebSite) entity with the\n[potentialAction](https://schema.org/docs/actions.html)\nproperty of the\n[schema.org/SearchAction](https://schema.org/SearchAction)\nmarkup. You can use JSON-LD, microdata, or RDFa to do this; check out the\n[full implementation details](/search/docs/appearance/structured-data/sitelinks-searchbox)\nin our documentation.\n\n\nIf you implement the markup on your site, users will have the ability to jump directly from the\nsitelinks search box to your site's search results page. If we don't find any markup, we'll show\nthem a Google search results page for the corresponding `site:` query, as we've done\nuntil now.\n\n\nAs always, if you have questions, you can ask in our\n[Webmaster Help forum](https://support.google.com/webmasters/go/community).\n|\n| **Update (16:30h CET, September 12th)**: We're noticing an enthusiastic uptick in the markup\n| implementation after the initial announcement last week! Here are the two main issues we've\n| observed so far, and what you need to do to fix them:\n|\n| 1.\n| Make sure that when you replace the curly braces and all that's inside of it with a search\n| term it leads to a valid URL on your site.\n|\n|\n| For example: if your `target` value is\n| `https://www.example.com/search?q={searchTerm}`,\n| ensure that `https://www.example.com/search?q=foo` and\n| `https://www.example.com/search?q=bar` both lead to search result pages about\n| `foo` and `bar`.\n| 2.\n| Make sure that the `query-input` field points to the same string that's inside\n| the curly braces in the `target` field.\n|\n|\n| For example: if your `target` value is\n| `https://www.example.com/search?q={searchTerm}`, you must use\n| `searchTerm` as the `name` within `query-input`.\n\nPosted by [Mariya\nMoeva](https://twitter.com/marrrr), Webmaster Trends Analyst, and Kaylin Spitz, Software Engineer"]]