使用 AND 運算子
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
您可以使用 AND
運算子搜尋多個字詞。只有在此運算子兩側的字詞皆為 true 時,運算子才會傳回結果。
多個字詞的搜尋會隱含使用 AND
。舉例來說,以下搜尋會傳回包含字詞 server
的 Python 檔案:
server lang:python
您也可以明確提供 AND 運算子。例如:
server AND lang:python
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eMultiple terms in a search are implicitly linked by \u003ccode\u003eAND\u003c/code\u003e, meaning results must contain all terms.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eAND\u003c/code\u003e can be explicitly used for clarity but functions identically to implicit multiple term searches.\u003c/p\u003e\n"],["\u003cp\u003eSearches can use operators like \u003ccode\u003elang:\u003c/code\u003e to refine results based on specific criteria such as programming language.\u003c/p\u003e\n"]]],[],null,["# Using the AND operator\n\nYou can search for multiple terms by using the [`AND`](../reference#operators)\noperator. This operator returns results only when the terms on both sides of the\noperator are true.\n\nA search for multiple terms uses `AND` implicitly. For example, the following\nsearch returns Python files that contain the term `server`: \n\n server lang:python\n\nAlternatively, you can supply the AND operator explicitly. For example: \n\n server AND lang:python"]]