1
0
mirror of synced 2025-12-19 18:10:59 -05:00

Add content for new code view and new code search public beta (#34948)

This commit is contained in:
Sam Browning
2023-02-23 13:08:25 -05:00
committed by GitHub
parent a30b079cf8
commit da58ab5cd8
40 changed files with 34 additions and 100 deletions

View File

@@ -26,15 +26,13 @@ On top of the new code search engine, the code search (beta) includes new featur
The new code search (beta) is tightly integrated with a redesigned code view (beta) on {% data variables.product.prodname_dotcom_the_website %}. {% data reusables.search.code-view-link %}
To get access to the new code search (beta), along with the new code view, you can sign up for the [waitlist](https://github.com/features/code-search-code-view/signup).
## Enabling and disabling the new code search and code view (beta)
{% data reusables.search.enabling-and-disabling-code-search-and-view-beta %}
## Limitations
We have indexed many public repositories for the new code search (beta), and continue to index more. Additionally, the private repositories of GitHub users in the beta are indexed and searchable by beta participants that already have access to those private repositories on GitHub.com. However, very large repositories may not be indexed at this time, and not all code is indexed.
We have indexed many public repositories for the new code search (beta), and continue to index more. Additionally, the private repositories of GitHub users in the beta are indexed and searchable by beta participants that already have access to those private repositories on GitHub.com. However, very large repositories may not be indexed at this time, and not all code is indexed.
The current limitations on indexed code are:
- Vendored and generated code is excluded (as determined by [Enry](https://github.com/go-enry/go-enry))

View File

@@ -35,36 +35,25 @@ For more information about the search syntax of the new code search (beta), see
1. In the top navigation of {% data variables.product.prodname_dotcom_the_website %}, click the search bar.
1. Under the search bar, you will see a list of suggestions organized by category, including recent searches and suggested repositories, teams, and projects that you have access to. You can also see a list of saved searches that you have created. For more information on saved searches, see "[Creating and managing saved searches](#creating-and-managing-saved-searches)."
![Search bar with suggestions and saved searches](/assets/images/help/search/code-search-beta-search-bar.png)
![Screenshot of the {% data variables.product.prodname_dotcom %} search bar. There is a list of search suggestions by category below the search bar.](/assets/images/help/search/code-search-beta-search-bar.png)
If you click on any of the specific suggestions, you will be taken directly to the page for that suggestion (for example, the repository or project page). If you click on a recent or saved search, depending on the type of search, the search query will appear in the search bar or you will be taken to the search results page for the search term.
1. Once you start typing a search query, you will see a list of completions and suggestions that match your query. You can click on a suggestion to jump to a specific location. As you type more qualifiers, you will see more specific suggestions, such as code files you can jump to directly.
![Search bar with a query and code suggestions](/assets/images/help/search/code-search-beta-search-bar-code-suggestions.png)
1. After typing your query, you can also press Enter to go to the full search results view, where you can see each match and a visual interface for applying filters. For more information, see "[Using the search results view](#using-the-search-results-view)."
![Screenshot of a search for "repo:octocat/spoon-knife". The code results are outlined in dark orange.](/assets/images/help/search/code-search-beta-search-bar-code-suggestions.png)
2. After typing your query, you can also press Enter to go to the full search results view, where you can see each match and a visual interface for applying filters. For more information, see "[Using the search results view](#using-the-search-results-view)."
## Creating and managing saved searches
1. In the top navigation of {% data variables.product.prodname_dotcom_the_website %}, click the search bar and start typing a search query (or any letter).
1. In the top navigation of {% data variables.product.prodname_dotcom_the_website %}, click the search bar and type `saved:`.
1. Under the search bar, the "Saved searches" section should now appear. Click {% octicon "plus-circle" aria-label="The plus-circle icon" %} **Create saved search**.
!["Create saved search" button in search bar](/assets/images/help/search/code-search-beta-create-saved-search.png)
1. In the pop-up window, fill out the name you want for your query and the query that you want to save. Click **Create saved search**.
!["Create saved search" window](/assets/images/help/search/code-search-beta-create-saved-search-window.png)
1. If you click again on the search bar, you can now see your saved search in the "Saved searches" section under the search bar. Clicking on a saved search entry will add the query to the search bar and filter the suggestions accordingly.
![Use saved search in search bar](/assets/images/help/search/code-search-beta-saved-search-in-search-bar.png)
- To edit a saved search, in the "Saved searches" section, click {% octicon "pencil" aria-label="The pencil icon" %} to the right of the saved search.
- To edit a saved search, in the "Saved searches" section, click {% octicon "pencil" aria-label="The pencil icon" %} to the right of the saved search.
- To delete a saved search, click {% octicon "trash" aria-label="The trash icon" %} to the right of the saved search.
![Buttons to edit or delete a saved search](/assets/images/help/search/code-search-beta-edit-or-delete-saved-search.png)
## Using the search results view
The search results view already exists for the classic search on GitHub, and the functionality for most search types, except code, is the same. With the new code search beta enabled, the search results page has a redesigned UI and includes filters that are supported in the new code search engine, such as path and symbol filters.
@@ -72,5 +61,3 @@ The search results view already exists for the classic search on GitHub, and the
To construct a search query, as well as view and filter results, using a visual interface, you can use the {% data variables.search.search_page_url %} or {% data variables.search.advanced_url %}. If you press Enter after typing a search query in the search bar, you will also be taken to the search results view.
On the search results view, you can navigate between different types of search results, including code, issues, pull request, repositories, and more. You can also view and use filters.
![Search results view](/assets/images/help/search/code-search-beta-results-view.png)