使用 OR 运算符
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
使用运算符 OR
搜索时,只要与关键字任一侧的表达式匹配,就会返回结果。例如,以下搜索返回包含术语 hello
或术语 world
的文件。
hello OR world
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThe \u003ccode\u003eOR\u003c/code\u003e operator helps you find results matching either of the expressions it connects.\u003c/p\u003e\n"],["\u003cp\u003eUsing \u003ccode\u003eOR\u003c/code\u003e broadens your search by including results containing either term.\u003c/p\u003e\n"],["\u003cp\u003eExample: \u003ccode\u003ehello OR world\u003c/code\u003e finds files containing either "hello" or "world".\u003c/p\u003e\n"]]],[],null,["# Using the OR operator\n\nThe [`OR`](../reference#operators) operator returns a result if it matches an\nexpression on either side of the keyword. For example, the following search\nreturns files that contain the term `hello` or the term `world`. \n\n hello OR world"]]