布林邏輯

毛慶禎
輔仁大學圖書資訊學系


把檢索要求以布林邏輯寫下, 可以得到較精確的結果。通常以加號、減號表示之。或者以雙引號括住檢索句子。

  1. 交集 AND
  2. 聯集 OR
  3. 差集 NOT
  4. 接近 Near
  5. 其他

在空格裡輸入要查詢的事項,再按下鍵盤上的歸位鍵 (ENTER),或是點選視窗內的 按鍵,就可以找出資料。

絕大部份的搜尋引擎要求<一字不差>,類似的查詢,但因為使用的字不一樣而得到不同的結果;例如,當查詢 "墾丁旅社"但卻沒找到需要的時,可以改查 "墾丁旅館" 或 "墾丁大飯店"。另外,不同的形容也會改變查詢範圍;例如,查詢 "折扣機票" 和 "便宜機票",會得到不太一樣的結果喔。

交集 AND

有時查詢會得到太廣泛的結果,為了得到最確切實用的資料,您需要改變查詢的方式來縮小查詢範圍,這就是 "搜尋結果內再查詢"。 

您可以加入更多的關鍵字詞,來篩選出更接近的資料;或是使用 " - " 減號,來淘汰較無關的網頁。

英文大小寫的關係,視情況而定,多半是不予理會。

查詢專有名詞

為專有名詞加上雙引號,可以避免誤解,還有助於正確地處理成語、名言或外國人名等較長的查詢。例如要找 "人間四月天",的相關網頁,加上雙引號,您就不會看到有關 『佛誕日』的資料:佛陀於『四月』從『天』上降臨『人間』....

此外,還可以用一些標點符號來連接文字,包括『-』、『\』、『+』、『,』、『=』及『'』。例如 mother-in-law ,雖然沒加雙引號,但也會把這三個字當成一個字查。

無法查詢的字

有一些字彙,例如 "http""com" ,以及部分單字及數字, 屬於高頻字(Stop word) 無法為您搜尋,因為這些字太頻繁出現在大部分的網頁,不但對查詢沒有幫助,還會嚴重減慢搜尋的速度。

必須查詢這些高頻字時,可以在字前使用『+』加號,使用時請記得要留一個空格在加號前。

例如:

微軟視窗 +98

OS/ +2

差集 NOT

增加查詢字詞可以縮小搜尋範圍,淘汱無關的資訊,可以有時排除一些關鍵字對搜尋可能更有幫助。 

"-"減號的功能,把減號放在要淘汰的字前時,請記得要和前面查詢字詞間空一格,否則會被誤以為是兩個字間的連號喔!

找山葉機車的資訊,使用如下的查詢:

山葉機車 -音樂

就可以排除山葉鋼琴、山葉音響、山葉音樂教室等的網頁。

其他

有一些字後面加冒號,代表特殊功能:

Realname 公司負責管理網路關鍵字,其作用有如網路上的註冊商標,是獨一無二的網站標誌;例如 Jeep Grand CherokeeRN 連到 Jeep 公司的正式網站裡,有關 Grand Cherokee 這一型汽車的網頁。

  1.  

ADVANCED SEARCH

  Introduction
 
While AltaVista's main search is used for general searches, Advanced Search is used to conduct very specific searches. Much of what you need to search for can probably be found quickly and with excellent results using the Main Search. However, if you need to find information within a certain range of dates or would like to perform Boolean searches, AltaVista's Advanced Search is the most powerful tool on the Web.

  What's the Difference Between Main Search and Advanced Search?
 
The main difference between the two is the ability of Advanced Search to use Boolean expressions. Boolean expressions are the words OR, AND, AND NOT, and NEAR used to create relationships among the keywords in your search query. Using these expressions allows you to tailor your search to find exactly what you are looking for.

Advanced Search also allows you to sort your results, specify particular dates in your query and more. These functions, along with Boolean expressions, are explained in greater detail below.

  A Look at the Search Box
 


The AltaVista search box contains the following elements:
Text entry box (Boolean query:)
Similar to the field in the Main Search box, this is where you type the words related to the information you are looking for. However, this box allows you to perform advanced search requests using Boolean expressions as explained below.

Search Tips and Examples
Under the text entry box are tips and examples on how to use AltaVista search more effectively. Tips and examples are changed regularly so be sure to notice it each time you visit to enhance your search experience.

Sort by
Allows you to specify how you would like the search results displayed. Results are sorted according to the word or words entered in this box. You can view unsorted results by using the Boolean query section alone with nothing in the 'Sort by:' search box.

Language drop-down menu
Using the language drop-down menu, you can restrict your search to information written only in the language you specify.

Date menu and entry fields
The date menu allows you to restrict your search to information published during a certain period of time. Use the From: and To: fields to specify the time period you wish to use in your search.
Note: Dates must be entered using the international format of DAY/MONTH/YEAR.

Search button
Click the Search button when you are ready to begin your search.

Tabs
Above the search box are three labeled tabs. The first tab is for the Main Search which was explained in greater detail earlier. The second is for the Advanced Search which is what we are describing in this section. The third tab is for Images, Audio & Video. If you are looking for multimedia instead of, or in addition to textual information, you can search this area of the Web also.

Links
The search box provides links to this help page, to the Family Filter setup page and to the page where you can specify your AltaVista language settings.
  What are Boolean Expressions?
Back to Top
 
Boolean expressions are words like OR, AND, AND NOT, and NEAR used to create relationships among the keywords in your search query. Parentheses ( ) can also be used in the Boolean query box to group expressions similar to the way you would group mathematical functions. Below is a list of expressions with their corresponding symbol (you may use either) and function.

Expression Symbol Action
AND & Finds documents containing all of the specified words or phrases. peanut AND butter finds documents with both the word peanut and the word butter.
OR | Finds documents containing at least one of the specified words or phrases. Peanut OR butter finds documents containing either peanut or butter. The found documents could contain both items, but not necessarily.
AND NOT ! Excludes documents containing the specified word or phrase. Peanut AND NOT butter finds documents with peanut but not containing butter. NOT must be used with another operator, like AND. AltaVista does not accept 'peanut NOT butter'; instead, specify peanut AND NOT butter..
NEAR ~ Finds documents containing both specified words or phrases within 10 words of each other. peanut NEAR butter would find documents with peanut butter, but probably not any other kind of butter.
  () Use parentheses to group complex Boolean phrases. For example, (peanut AND butter) AND (jelly or jam) finds documents with the words 'peanut butter and jelly' or 'peanut butter and jam' or both.


Here is a sample of Advanced Search that uses all of the advanced features:



  1. Type (ballroom OR salsa) AND dance in the Boolean query box. This Boolean query will find all documents containing the phrases 'ballroom dance' and 'salsa dance.'

  2. Type tango waltz in the 'Sort by:' box. This step sorts the documents so that tango and waltz appear at the top of your results.

  3. Type 01/JAN/99 in the From: box and 30/JUN/99 in the To: box. This step limits the results to documents that have been updated in the first half of 1999.
    Note: If you do not include a month or year in the From: or To: fields, the search will use the current month and year.

  4. Click the Search button to begin your search.


參考資源

  1. Google 小教室, http://www.google.com/intl/zh-TW/help.html 

輔仁大學圖書資訊學系 毛慶禎
mao@blue.lins.fju.edu.tw
http://www.lins.fju.edu.tw/~mao/internet/boolean.htm
2001/10/17