自定义搜索引擎_如何创建自己的自定义Google搜索引擎
自定義搜索引擎
Have you ever wanted to create a custom Google search engine that searches only specific websites? You can easily do this with Google’s Custom Search Engine tool. You can bookmark your search engine and even share it with other people.
您是否曾經(jīng)想過(guò)創(chuàng)建僅搜索特定網(wǎng)站的自定義Google搜索引擎? 您可以使用Google的“自定義搜索引擎”工具輕松完成此操作。 您可以為搜索引擎添加書(shū)簽,甚至可以與他人共享。
This trick works similarly to Google’s site: operator, but you won’t have to type the operator every time you search. It’s particularly useful if you want to search a large number of sites at once.
此技巧的用法類似于Google的站點(diǎn):operator ,但是您不必在每次搜索時(shí)都鍵入運(yùn)算符。 如果要一次搜索大量站點(diǎn),此功能特別有用。
創(chuàng)建自定義搜索引擎 (Creating a Custom Search Engine)
To get started, head over to the Google Custom Search Engine page and click the Create a custom search engine button. You’ll need a Google account for this – the search engine will be saved with your Google account.
首先,請(qǐng)轉(zhuǎn)到Google自定義搜索引擎頁(yè)面,然后單擊創(chuàng)建自定義搜索引擎按鈕。 為此,您需要一個(gè)Google帳戶-搜索引擎將與您的Google帳戶一起保存。
Enter a name and description for your search engine – these can be anything you like.
輸入搜索引擎的名稱和描述-您可以隨意輸入。
The Sites to search field is the one that really matters. Here, you’ll specify a list of the websites you want to search. For example, if you wanted to search both howtogeek.com and microsoft.com, you’d enter:
“ 要搜索的網(wǎng)站”字段確實(shí)很重要。 在這里,您將指定要搜索的網(wǎng)站列表。 例如,如果您要搜索howtogeek.com和microsoft.com,請(qǐng)輸入:
howtogeek.com/*
howtogeek.com/*
microsoft.com/*
microsoft.com/*
The * character is the wildcard, which can match anything, so the /* characters tell your search engine to search everything on both of these websites.
*字符是通配符,可以匹配任何內(nèi)容,因此/ *字符告訴您的搜索引擎搜索這兩個(gè)網(wǎng)站上的所有內(nèi)容。
There are more advanced things you can do with this box – we’ll get back to that in a bit.
您可以使用此框執(zhí)行更高級(jí)的操作-我們稍后再討論。
After clicking Next, you can specify a style for your search results and test the search engine you created.
單擊“下一步”后,您可以為搜索結(jié)果指定樣式并測(cè)試您創(chuàng)建的搜索引擎。
Once you’re happy with your search engine, click the Next button at the bottom of the page and you’ll end up at a page that gives you an embed code for your search engine.
對(duì)搜索引擎感到滿意之后,請(qǐng)單擊頁(yè)面底部的“下一步”按鈕,您將最終到達(dá)一個(gè)為您的搜索引擎提供嵌入代碼的頁(yè)面。
You’re probably not a web developer, so you’ll want to ignore this page. Click the Google Custom Search logo at the top of the page instead.
您可能不是網(wǎng)絡(luò)開(kāi)發(fā)人員,所以您將忽略此頁(yè)面。 而是點(diǎn)擊頁(yè)面頂部的Google自定義搜索徽標(biāo)。
To get to your search engine’s page, click its name in the list of search engines you’ve created.
要進(jìn)入搜索引擎頁(yè)面,請(qǐng)?jiān)谀鷦?chuàng)建的搜索引擎列表中單擊其名稱。
You can bookmark this page for easy access your search engine. You can also share your search engine with anyone by sending them the full URL that appears in your address bar.
您可以在此頁(yè)面上添加書(shū)簽,以方便訪問(wèn)搜索引擎。 您還可以通過(guò)向他們發(fā)送地址欄中顯示的完整URL,與任何人共享搜索引擎。
URL技巧 (URL Tricks)
You don’t have to specify an entire website while creating your custom search engine.
創(chuàng)建自定義搜索引擎時(shí),您不必指定整個(gè)網(wǎng)站。
For example, the custom search engine above searches all areas of microsoft.com. If we do an example search, we might see that there’s useful information coming from windows.microsoft.com and support.microsoft.com, but the results from answers.microsoft.com (Microsoft’s support forum) are not very helpful.
例如,上面的自定義搜索引擎搜索microsoft.com的所有區(qū)域。 如果我們進(jìn)行示例搜索,我們可能會(huì)發(fā)現(xiàn)有一些有用的信息來(lái)自windows.microsoft.com和support.microsoft.com ,但是answers.microsoft.com (Microsoft的支持論壇)的結(jié)果不是很有幫助。
To exclude answers.microsoft.com and include the other subdomains, we could use the following URL list while creating a search engine:
為了排除Answers.microsoft.com并包括其他子域,我們可以在創(chuàng)建搜索引擎時(shí)使用以下URL列表:
howtogeek.com/* windows.microsoft.com/* support.microsoft.com/*
howtogeek.com/* windows.microsoft.com/* support.microsoft.com/*
Note that there’s no way to exclude a specific subdomain – we can only include the ones we want to search. This list will search only the two subdomains on microsoft.com.
請(qǐng)注意,無(wú)法排除特定的子域-我們只能包含要搜索的子域。 此列表將僅搜索microsoft.com上的兩個(gè)子域。
There are several other types of URLs you can define in this list:
您可以在此列表中定義其他幾種URL:
- 
Single Page: You can define only one specific page by entering its URL, such as example.com/page.html. This will include only a single web page in the search engine. 單頁(yè) :您只能通過(guò)輸入U(xiǎn)RL來(lái)定義一個(gè)特定頁(yè)面,例如example.com/page.html 。 這將僅在搜索引擎中包含一個(gè)網(wǎng)頁(yè)。 
- 
Part of a Website: You can use the * character in other ways. For example, the URL support.microsoft.com/kb/* will search only Microsoft Knowledge Base articles. Using the URL example.com/*word* will search all pages on example.com that have word in their URLs. 網(wǎng)站的一部分 :您可以通過(guò)其他方式使用*字符。 例如,URL support.microsoft.com/kb/*將僅搜索Microsoft知識(shí)庫(kù)文章。 使用URL example.com/*word*將搜索example.com上URL中包含單詞的所有頁(yè)面。 
You can continue fine-tuning the search engine until you’re happy with the results by clicking the back to step 1 link, modifying the URLs, and then performing another test search.
您可以繼續(xù)微調(diào)搜索引擎,直到對(duì)結(jié)果滿意為止,方法是單擊返回到步驟1的鏈接,修改URL,然后執(zhí)行另一個(gè)測(cè)試搜索。
Once you’re done, you can even add your custom search engine to your browser’s search bar.
完成后,您甚至可以將自定義搜索引擎添加到瀏覽器的搜索欄中 。
翻譯自: https://www.howtogeek.com/124703/how-to-create-your-own-custom-google-search-engine/
自定義搜索引擎
總結(jié)
以上是生活随笔為你收集整理的自定义搜索引擎_如何创建自己的自定义Google搜索引擎的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
 
                            
                        - 上一篇: 细粒度图像分析_图像分类研究现状
- 下一篇: lumen 错误&日志
