{"meta":{"title":"検索構文を理解する","intro":"GitHubを検索するときに、特定の数値と単語に一致するクエリを作成できます。","product":"GitHubで検索する","breadcrumbs":[{"href":"/ja/search-github","title":"GitHubで検索する"},{"href":"/ja/search-github/getting-started-with-searching-on-github","title":"GitHubで検索を開始する"},{"href":"/ja/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax","title":"検索構文について"}],"documentType":"article"},"body":"# 検索構文を理解する\n\nGitHubを検索するときに、特定の数値と単語に一致するクエリを作成できます。\n\n> \\[!NOTE]\n> 以下の構文は、コード以外の検索に適用されます。 コード検索の構文の詳細については、「[GitHubのコード検索構文を理解する](/ja/search-github/github-code-search/understanding-github-code-search-syntax)」を参照してください。\n\n## ある値より大きいまたは小さい値のクエリ\n\n`>`、`>=`、`<`、`<=` を使用して、ある値より大きい、以上、より小さい、および以下の値を検索できます。\n\n| クエリ                                                                                                                                                         | 例 |\n| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | - |\n| <code>><em>n</em></code>                                                                                                                                    |   |\n| \\*\\*                                                                                                                                                        |   |\n| [cats stars:>1000](https://github.com/search?utf8=%E2%9C%93\\&q=cats+stars%3A%3E1000\\&type=Repositories)\\*\\* は、1,000 個を超える星を持つ \"cats\" というワードを持つリポジトリとマッチします。 |   |\n| <code>>=<em>n</em></code>                                                                                                                                   |   |\n| \\*\\*                                                                                                                                                        |   |\n| [cats topics:>=5](https://github.com/search?utf8=%E2%9C%93\\&q=cats+topics%3A%3E%3D5\\&type=Repositories)\\*\\* は、5 つ以上のトピックを持つ \"cats\" というワードを持つリポジトリとマッチします。   |   |\n| <code><<em>n</em></code>                                                                                                                                    |   |\n| \\*\\*                                                                                                                                                        |   |\n| [cats size:<10000](https://github.com/search?utf8=%E2%9C%93\\&q=cats+size%3A%3C10000\\&type=Code)\\*\\* は、10 KB 未満のファイル内の \"cats\" というワードを持つコードとマッチします。           |   |\n| <code><=<em>n</em></code>                                                                                                                                   |   |\n| \\*\\*                                                                                                                                                        |   |\n| [cats stars:<=50](https://github.com/search?utf8=%E2%9C%93\\&q=cats+stars%3A%3C%3D50\\&type=Repositories)\\*\\* は、50 個以下の星を持つ \"cats\" というワードを持つリポジトリとマッチします。     |   |\n\n[範囲クエリ](#query-for-values-between-a-range)を使用して、ある値以上または以下の値を検索することもできます。\n\n| クエリ                                                                                                                                                                            | 例 |\n| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | - |\n| <code><em>n</em>..\\*</code>                                                                                                                                                    |   |\n| \\*\\*                                                                                                                                                                           |   |\n| [cats stars:10..\\*](https://github.com/search?utf8=%E2%9C%93\\&q=cats+stars%3A10..*\\&type=Repositories)\\*\\* は、`stars:>=10` に相当し、10 個以上の星を持つ \"cats\" というワードを持つリポジトリとマッチします。       |   |\n| <code>\\*..<em>n</em></code>                                                                                                                                                    |   |\n| \\*\\*                                                                                                                                                                           |   |\n| [cats stars:\\*..10](https://github.com/search?utf8=%E2%9C%93\\&q=cats+stars%3A%22*..10%22\\&type=Repositories)\\*\\* は、`stars:<=10` に相当し、10 個以下の星を持つ \"cats\" というワードを持つリポジトリとマッチします。 |   |\n\n## 一定範囲にある値のクエリ\n\n範囲構文 <code><em>n</em>..<em>n</em></code> を使用して範囲内の値を検索できます。最初の数値 N は最小値、2 番目の数値は最大値です。\n\n| クエリ                                                                                                                                                         | 例 |\n| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | - |\n| <code><em>n</em>..<em>n</em></code>                                                                                                                         |   |\n| \\*\\*                                                                                                                                                        |   |\n| [cats stars:10..50](https://github.com/search?utf8=%E2%9C%93\\&q=cats+stars%3A10..50\\&type=Repositories)\\*\\* は、10 から 50 個の星を持つ \"cats\" というワードを持つリポジトリとマッチします。 |   |\n\n## 日付のクエリ\n\n`>`、`>=`、`<`、`<=` と[範囲クエリ](#query-for-values-between-a-range)を使用して、ある日付より前または後の日付、または日付の範囲内にある日付を検索できます。 日付の書式設定は、[ISO8601](http://en.wikipedia.org/wiki/ISO_8601) 標準の `YYYY-MM-DD` (年-月-日) に従う必要があります。\n\n| クエリ                                                                                                                                                                                                       | 例 |\n| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - |\n| <code>><em>YYYY</em>-<em>MM</em>-<em>DD</em></code>                                                                                                                                                       |   |\n| \\*\\*                                                                                                                                                                                                      |   |\n| [cats created:>2016-04-29](https://github.com/search?utf8=%E2%9C%93\\&q=cats+created%3A%3E2016-04-29\\&type=Issues)\\*\\* は、2016 年 4 月 29 日より後に作成された \"cats\" というワードを含む issue とマッチします。                          |   |\n| <code>>=<em>YYYY</em>-<em>MM</em>-<em>DD</em></code>                                                                                                                                                      |   |\n| \\*\\*                                                                                                                                                                                                      |   |\n| [cats created:>=2017-04-01](https://github.com/search?utf8=%E2%9C%93\\&q=cats+created%3A%3E%3D2017-04-01\\&type=Issues)\\*\\* は、2017 年 4 月 1 日以降に作成された \"cats\" というワードを含む issue とマッチします。                        |   |\n| <code><<em>YYYY</em>-<em>MM</em>-<em>DD</em></code>                                                                                                                                                       |   |\n| \\*\\*                                                                                                                                                                                                      |   |\n| [cats pushed:<2012-07-05](https://github.com/search?q=cats+pushed%3A%3C2012-07-05\\&type=Repositories\\&utf8=%E2%9C%93)\\*\\* は、2012 年 7 月 5 日より前にプッシュされた \"cats\" というワードを含むリポジトリとマッチします。                       |   |\n| <code><=<em>YYYY</em>-<em>MM</em>-<em>DD</em></code>                                                                                                                                                      |   |\n| \\*\\*                                                                                                                                                                                                      |   |\n| [cats created:<=2012-07-04](https://github.com/search?utf8=%E2%9C%93\\&q=cats+created%3A%3C%3D2012-07-04\\&type=Issues)\\*\\* は、2012 年 7 月 4 日以前に作成された \"cats\" というワードを含む issue とマッチします。                        |   |\n| <code><em>YYYY</em>-<em>MM</em>-<em>DD</em>..<em>YYYY</em>-<em>MM</em>-<em>DD</em></code>                                                                                                                 |   |\n| \\*\\*                                                                                                                                                                                                      |   |\n| [cats pushed:2016-04-30..2016-07-04](https://github.com/search?utf8=%E2%9C%93\\&q=cats+pushed%3A2016-04-30..2016-07-04\\&type=Repositories)\\*\\* は、2016 年 4 月末から 7 月の間にプッシュされた \"cats\" というワードを含むリポジトリとマッチします。 |   |\n| <code><em>YYYY</em>-<em>MM</em>-<em>DD</em>..\\*</code>                                                                                                                                                    |   |\n| \\*\\*                                                                                                                                                                                                      |   |\n| [cats created:2012-04-30..\\*](https://github.com/search?utf8=%E2%9C%93\\&q=cats+created%3A2012-04-30..*\\&type=Issues)\\*\\* は、2012 年 4 月 30 日以降に作成された \"cats\" というワードを含む issue とマッチします。                        |   |\n| <code>\\*..<em>YYYY</em>-<em>MM</em>-<em>DD</em></code>                                                                                                                                                    |   |\n| \\*\\*                                                                                                                                                                                                      |   |\n| [cats created:\\*..2012-07-04](https://github.com/search?utf8=%E2%9C%93\\&q=cats+created%3A*..2012-07-04\\&type=Issues)\\*\\* は、2012 年 7 月 4 日以前に作成された \"cats\" というワードを含む issue とマッチします。                         |   |\n\n日付の後にオプションの時刻情報 `THH:MM:SS+00:00` を追加して、時間、分、秒で検索することもできます。 これは、`T` の後に `HH:MM:SS` (時-分-秒)、UTC オフセット (`+00:00`) が続きます。\n\n| クエリ                                                                                                                                                                                                                                                                       | 例 |\n| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - |\n| <code><em>YYYY</em>-<em>MM</em>-<em>DD</em>T<em>HH</em>:<em>MM</em>:<em>SS</em>+<em>00</em>:<em>00</em></code>                                                                                                                                                            |   |\n| \\*\\*                                                                                                                                                                                                                                                                      |   |\n| [cats created:2017-01-01T01:00:00+07:00..2017-03-01T15:30:15+07:00](https://github.com/search?utf8=%E2%9C%93\\&q=cats+created%3A2017-01-01T01%3A00%3A00%2B07%3A00..2017-03-01T15%3A30%3A15%2B07%3A00\\&type=Issues)\\*\\* は、2017 年 1 月 1 日午前 1 時に作成された issues と一致します。         |   |\n| `07:00` の 2017 年 1 月 1 日午前 1 時から UTC オフセットが                                                                                                                                                                                                                               |   |\n| `07:00` の UTC オフセットを持つ場合。                                                                                                                                                                                                                                                 |   |\n| <code><em>YYYY</em>-<em>MM</em>-<em>DD</em>T<em>HH</em>:<em>MM</em>:<em>SS</em>Z</code>                                                                                                                                                                                   |   |\n| \\*\\*                                                                                                                                                                                                                                                                      |   |\n| [cats created:2016-03-21T14:11:00Z..2016-04-07T20:45:00Z](https://github.com/search?utf8=%E2%9C%93\\&q=cats+created%3A2016-03-21T14%3A11%3A00Z..2016-04-07T20%3A45%3A00Z\\&type=Issues)\\*\\* は、2016 年 3 月 21 日午後 2 時 11 分から 2016 年 4 月 7 日午後 8 時 45 分の間に作成された issue とマッチします。 |   |\n\n## 修飾子に一致する結果を除外する\n\n検索結果を絞り込むには、1 つ以上のサブセットを除外します。 修飾子に一致する結果をすべて除外するには、ハイフン (`-`) をプレフィックスとして検索修飾子に設定します。\n\n| クエリ                                                                                                                                                                                  | 例 |\n| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | - |\n| <code>-<em>QUALIFIER</em></code>                                                                                                                                                     |   |\n| \\*\\*                                                                                                                                                                                 |   |\n| \\[                                                                                                                                                                                   |   |\n| `cats stars:>10 -language:javascript`                                                                                                                                                |   |\n| ]\\([https://github.com/search?q=cats+stars%3A>10+-language%3Ajavascript\\&type=Repositories](https://github.com/search?q=cats+stars%3A>10+-language%3Ajavascript\\&type=Repositories)) |   |\n| \\*\\* は、10 個を超える星を持つが、JavaScript では記述されていない \"cats\" というワードを持つリポジトリとマッチします。                                                                                                             |   |\n| <code>-<em>QUALIFIER</em></code>                                                                                                                                                     |   |\n| \\*\\*                                                                                                                                                                                 |   |\n| \\[                                                                                                                                                                                   |   |\n| `mentions:defunkt -org:github`                                                                                                                                                       |   |\n| ]\\(<https://github.com/search?utf8=%E2%9C%93&q=mentions%3Adefunkt+-org%3Agithub&type=Issues>)                                                                                        |   |\n| \\*\\* は、GitHub組織内のリポジトリにない@defunktに関する問題と一致します。                                                                                                                                       |   |\n\n## 特定のキーワードを含む結果を除外する\n\n`NOT` 構文を使用して、特定のワードを含む結果を除外できます。\n`NOT` 演算子は、文字列キーワードにのみ使用できます。 数や日付では機能しません。\n\n| クエリ                                                                                                                                        | 例 |\n| ------------------------------------------------------------------------------------------------------------------------------------------ | - |\n| `NOT`                                                                                                                                      |   |\n| \\*\\*                                                                                                                                       |   |\n| [hello NOT world](https://github.com/search?q=hello+NOT+world\\&type=Repositories)\\*\\* は、\"hello\" というワードを持ち、\"world\" というワードを持たないリポジトリとマッチします。 |   |\n\n## 空白のあるクエリに引用符を使う\n\n検索クエリに空白がある場合は引用符で囲む必要があります。 次に例を示します。\n\n* [cats NOT \"hello world\"](https://github.com/search?utf8=✓\\&q=cats+NOT+\"hello+world\"\\&type=Repositories) は、\"cats\" というワードを持ち、\"hello world\" というワードを持たないリポジトリとマッチします。\n* [build label:\"bug fix\"](https://github.com/search?utf8=%E2%9C%93\\&q=build+label%3A%22bug+fix%22\\&type=Issues) は、\"bug fix\" というラベルを持つ \"build\" というワードを含む issue とマッチします。\n\n## ユーザ名によるクエリ\n\n`user`、`actor`、`assignee`などのユーザー名を必要とする修飾子が検索クエリに含まれている場合は、任意の有効なユーザー名を使用して特定のユーザーを指定したり現在のユーザーを指定`@me`したり、`@copilot`を指定Copilotすることができます。\n\n| クエリ                                                                                                                                                                                                                                       | 例 |\n| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - |\n| `QUALIFIER:USERNAME`                                                                                                                                                                                                                      |   |\n| \\[                                                                                                                                                                                                                                        |   |\n| `author:nat`                                                                                                                                                                                                                              |   |\n| ]\\(<https://github.com/search?q=author%3Anat&type=Commits>) は @nat が作成したコミットとマッチします                                                                                                                                                       |   |\n| `QUALIFIER:@me`                                                                                                                                                                                                                           |   |\n| \\[                                                                                                                                                                                                                                        |   |\n| `is:issue assignee:@me`                                                                                                                                                                                                                   |   |\n| ]\\(<https://github.com/search?q=is%3Aissue+assignee%3A%40me&type=Issues>) は、結果を閲覧しているユーザーに割り当てられた issue とマッチします                                                                                                                           |   |\n|                                                                                                                                                                                                                                           |   |\n| `QUALIFIER:@copilot`                                                                                                                                                                                                                      |   |\n| \\[                                                                                                                                                                                                                                        |   |\n| `is:pr reviewed-by:@copilot`                                                                                                                                                                                                              |   |\n| ]\\(<https://github.com/search?q=is:pr+reviewed-by:@copilot&type=pullrequests>) は、 Copilotによってレビューされたプル要求と一致します。 詳しくは、「[GitHub Copilot を使ったコードレビュー](/ja/copilot/how-tos/use-copilot-agents/request-a-code-review/use-code-review)」をご覧ください。 |   |\n|                                                                                                                                                                                                                                           |   |\n\n`@me`\nまたは`@copilot`は修飾子でのみ使用でき、`@me main.workflow`などの検索用語としては使用できません。"}