Skip to content

Commit

Permalink
Hack Week 2025: update product.product_name in `/content/search-git…
Browse files Browse the repository at this point in the history
…hub` (#54030)

Co-authored-by: Kevin Heis <[email protected]>
Co-authored-by: Isaac Brown <[email protected]>
  • Loading branch information
3 people authored Jan 22, 2025
1 parent ea44900 commit 3714cfb
Show file tree
Hide file tree
Showing 20 changed files with 69 additions and 80 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: About searching on GitHub
intro: 'Our integrated search covers the many repositories, users, and lines of code on {% data variables.product.product_name %}.'
intro: 'Our integrated search covers the many repositories, users, and lines of code on {% data variables.product.github %}.'
redirect_from:
- /articles/using-the-command-bar
- /articles/github-search-basics
Expand All @@ -22,7 +22,7 @@ topics:

{% data reusables.search.you-can-search-globally %}

* To search globally across all of {% data variables.product.product_name %}, type what you're looking for into the search field at the top of any page, and choose "Search all of {% data variables.product.prodname_dotcom %}"{% ifversion fpt or ghec or ghes < 3.12 %} in the search dropdown menu{% endif %}.
* To search globally across all of {% data variables.product.github %}, type what you're looking for into the search field at the top of any page, and choose "Search all of {% data variables.product.prodname_dotcom %}"{% ifversion fpt or ghec or ghes < 3.12 %} in the search dropdown menu{% endif %}.
* To search within a particular repository or organization, navigate to the repository or organization page, type what you're looking for into the search field at the top of the page, and press **Enter**.

{% ifversion code-search-upgrade %}You can also use suggestions and completions in the search bar to quickly find what you need.
Expand All @@ -36,13 +36,13 @@ After typing a search query, you can press **Enter** to go to the full search re

> [!NOTE]
> * {% data reusables.search.required_login %}
> * {% data variables.product.prodname_pages %} sites are not searchable on {% data variables.product.product_name %}. However you can search the source content if it exists in the default branch of a repository, using code search. For more information, see [AUTOTITLE]{% ifversion code-search-upgrade %}(/search-github/github-code-search/understanding-github-code-search-syntax){% else %}(/search-github/searching-on-github/searching-code){% endif %}. For more information about {% data variables.product.prodname_pages %}, see [AUTOTITLE](/pages/getting-started-with-github-pages/about-github-pages)
> * {% data variables.product.prodname_pages %} sites are not searchable on {% data variables.product.github %}. However you can search the source content if it exists in the default branch of a repository, using code search. For more information, see [AUTOTITLE]{% ifversion code-search-upgrade %}(/search-github/github-code-search/understanding-github-code-search-syntax){% else %}(/search-github/searching-on-github/searching-code){% endif %}. For more information about {% data variables.product.prodname_pages %}, see [AUTOTITLE](/pages/getting-started-with-github-pages/about-github-pages)
> * Currently our search doesn't support exact matching.{% ifversion ghes %}
> * Whenever you are searching in code files, only the first two results in each file will be returned.{% endif %}
After running a search on {% data variables.product.product_name %}, you can sort the results, or further refine them by clicking one of the languages in the sidebar. For more information, see [AUTOTITLE](/search-github/getting-started-with-searching-on-github/sorting-search-results).
After running a search on {% data variables.product.github %}, you can sort the results, or further refine them by clicking one of the languages in the sidebar. For more information, see [AUTOTITLE](/search-github/getting-started-with-searching-on-github/sorting-search-results).

{% data variables.product.product_name %} search uses an ElasticSearch cluster to index projects every time a change is pushed to {% data variables.product.product_name %}. Issues and pull requests are indexed when they are created or modified.
{% data variables.product.github %} search uses an ElasticSearch cluster to index projects every time a change is pushed to {% data variables.product.github %}. Issues and pull requests are indexed when they are created or modified.

## Types of searches on {% data variables.product.prodname_dotcom %}

Expand All @@ -60,29 +60,23 @@ You can search for the following information across all repositories you can acc

## Searching using a visual interface

In addition to the search bar, you can search {% data variables.product.product_name %} using the {% data variables.search.search_page_url %} or {% data variables.search.advanced_url %}. {% ifversion command-palette %}Alternatively, you can use the interactive search in the {% data variables.product.prodname_command_palette %} to search your current location in the UI, a specific user, repository or organization, and globally across all of {% data variables.product.product_name %}, without leaving the keyboard. For more information, see [AUTOTITLE](/get-started/accessibility/github-command-palette).{% endif %}
In addition to the search bar, you can search {% data variables.product.github %} using the {% data variables.search.search_page_url %} or {% data variables.search.advanced_url %}. {% ifversion command-palette %}Alternatively, you can use the interactive search in the {% data variables.product.prodname_command_palette %} to search your current location in the UI, a specific user, repository or organization, and globally across all of {% data variables.product.github %}, without leaving the keyboard. For more information, see [AUTOTITLE](/get-started/accessibility/github-command-palette).{% endif %}

The {% data variables.search.advanced_url %} provides a visual interface for constructing search queries. You can filter your searches by a variety of factors, such as the number of stars or number of forks a repository has. As you fill in the advanced search fields, your query will automatically be constructed in the top search bar.

![Advanced Search page. Top search bar holds "kittens user:octocat" query. Under "Advanced options", "From these owners" text box holds term "octocat".](/assets/images/help/search/advanced-search.png)

## Searching repositories on {% data variables.product.prodname_dotcom_the_website %} from your private enterprise environment

{% ifversion fpt or ghec %}
If you use {% data variables.product.prodname_dotcom_the_website %} or {% data variables.enterprise.data_residency_site %} as well as {% data variables.product.prodname_ghe_server %}, and an enterprise owner has enabled {% data variables.enterprise.prodname_unified_search %}, you can search across both environments at the same time from {% data variables.product.prodname_ghe_server %}. For more information, see {% ifversion fpt or ghec %}[AUTOTITLE](/enterprise-server@latest/search-github/getting-started-with-searching-on-github/about-searching-on-github#searching-repositories-on-githubcom-from-your-private-enterprise-environment) in the {% data variables.product.prodname_ghe_server %} documentation.{% elsif ghes %}[AUTOTITLE](/admin/configuration/configuring-github-connect/enabling-unified-search-for-your-enterprise).

If you use both {% data variables.product.prodname_dotcom_the_website %} and {% data variables.product.prodname_ghe_server %}, and an enterprise owner has enabled {% data variables.enterprise.prodname_unified_search %}, you can search across both environments at the same time from {% data variables.product.prodname_ghe_server %}. For more information, see [AUTOTITLE](/enterprise-server@latest/search-github/getting-started-with-searching-on-github/about-searching-on-github#searching-repositories-on-githubcom-from-your-private-enterprise-environment) in the {% data variables.product.prodname_ghe_server %} documentation.
Your enterprise owner on {% data variables.product.prodname_ghe_server %} can separately enable {% data variables.enterprise.prodname_unified_search %} for all public repositories on {% data variables.product.prodname_dotcom_the_website %} and for private repositories owned by the organization or enterprise on {% data variables.product.prodname_dotcom_the_website %} or {% data variables.enterprise.data_residency_site %} that is connected to {% data variables.product.prodname_ghe_server %} through {% data variables.product.prodname_github_connect %}.

{% else %}
Before you can use {% data variables.enterprise.prodname_unified_search %} for private repositories, you must connect your user accounts across environments. For more information, see [AUTOTITLE](/search-github/getting-started-with-searching-on-github/enabling-githubcom-repository-search-from-your-private-enterprise-environment).

If you use both {% data variables.product.prodname_dotcom_the_website %} and {% data variables.product.product_name %}, and an enterprise owner has enabled {% data variables.enterprise.prodname_unified_search %}, you can search across both environments at the same time from {% data variables.product.product_name %}. For more information about how enterprise owners can enable {% data variables.enterprise.prodname_unified_search %}, see [AUTOTITLE](/admin/configuration/configuring-github-connect/enabling-unified-search-for-your-enterprise).
When you search from {% data variables.product.prodname_ghe_server %}, only private repositories that you have access to and that are owned by the connected organization or enterprise account will be included in search results. Neither you nor anyone else will be able to search private repositories owned by your user account on {% data variables.product.prodname_dotcom_the_website %} or {% data variables.enterprise.data_residency_site %} from {% data variables.product.prodname_ghe_server %}.

Your enterprise owner on {% data variables.product.product_name %} can separately enable {% data variables.enterprise.prodname_unified_search %} for all public repositories on {% data variables.product.prodname_dotcom_the_website %} and for private repositories owned by the organization or enterprise on {% data variables.product.prodname_dotcom_the_website %} that is connected to {% data variables.product.product_name %} through {% data variables.product.prodname_github_connect %}.

Before you can use {% data variables.enterprise.prodname_unified_search %} for private repositories, you must connect your personal accounts on {% data variables.product.prodname_dotcom_the_website %} and {% data variables.product.product_name %}. For more information, see [AUTOTITLE](/search-github/getting-started-with-searching-on-github/enabling-githubcom-repository-search-from-your-private-enterprise-environment).

When you search from {% data variables.product.product_name %}, only private repositories that you have access to and that are owned by the connected organization or enterprise account will be included in search results. Neither you nor anyone else will be able to search private repositories owned by your personal account on {% data variables.product.prodname_dotcom_the_website %} from {% data variables.product.product_name %}.

To limit your search to one environment, you can use a filter option on the {% data variables.search.advanced_url %} or you can use the `environment:` search prefix. To only search for content on {% data variables.product.product_name %}, use the search syntax `environment:local`. To only search for content on {% data variables.product.prodname_dotcom_the_website %}, use `environment:github`.
To limit your search to one environment, you can use a filter option on the {% data variables.search.advanced_url %} or you can use the `environment:` search prefix. To only search for content on {% data variables.product.prodname_ghe_server %}, use the search syntax `environment:local`. To only search for content on {% data variables.product.prodname_dotcom_the_website %}, use `environment:github`.
{% endif %}

## Further reading
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ You can search for designated private repositories on {% data variables.product.

## Prerequisites

An enterprise owner for {% data variables.product.product_name %} must enable {% data variables.product.prodname_github_connect %} and {% data variables.enterprise.prodname_unified_search %} for private repositories. For more information, see [AUTOTITLE](/admin/configuration/configuring-github-connect/enabling-unified-search-for-your-enterprise).
An enterprise owner for {% data variables.product.prodname_ghe_server %} must enable {% data variables.product.prodname_github_connect %} and {% data variables.enterprise.prodname_unified_search %} for private repositories. For more information, see [AUTOTITLE](/admin/configuration/configuring-github-connect/enabling-unified-search-for-your-enterprise).

## Enabling unified repository search from {% data variables.product.product_name %}
## Enabling unified repository search from {% data variables.product.prodname_ghe_server %}

1. Sign in to both your user account on {% data variables.product.product_name %} **and** your user account on {% data variables.product.prodname_ghe_cloud %} ({% data variables.product.prodname_dotcom_the_website %}{% ifversion ghecom-github-connect %} or {% data variables.enterprise.data_residency_site %}{% endif %}).
1. On {% data variables.product.product_name %}, in the upper-right corner of any page, click your profile photo, then click **Settings**.
1. Sign in to both your user account on {% data variables.product.prodname_ghe_server %} **and** your user account on {% data variables.product.prodname_ghe_cloud %} ({% data variables.product.prodname_dotcom_the_website %}{% ifversion ghecom-github-connect %} or {% data variables.enterprise.data_residency_site %}{% endif %}).
1. On {% data variables.product.prodname_ghe_server %}, in the upper-right corner of any page, click your profile photo, then click **Settings**.

{% ifversion global-nav-update %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Getting started with searching on GitHub
intro: 'You can use a wide range of syntax to search {% data variables.product.product_name %}. You can adjust the scope of your search, build and troubleshoot queries, and sort search results with qualifiers.'
intro: 'You can use a wide range of syntax to search {% data variables.product.github %}. You can adjust the scope of your search, build and troubleshoot queries, and sort search results with qualifiers.'
redirect_from:
- /articles/getting-started-with-searching-on-github
- /github/searching-for-information-on-github/getting-started-with-searching-on-github
Expand All @@ -18,4 +18,3 @@ children:
- /enabling-repository-search-across-environments
shortTitle: Start with search on GitHub
---

Loading

0 comments on commit 3714cfb

Please sign in to comment.