Using the OR operator
Stay organized with collections
Save and categorize content based on your preferences.
The OR
operator returns a result if it matches an
expression on either side of the keyword. For example, the following search
returns files that contain the term hello
or the term world
.
hello OR world
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-03 UTC."],[[["\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"]]