Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jules <19994093+jules-p@users.noreply.github.com>
  • Loading branch information
saritai and jules-p authored Nov 2, 2022
1 parent b70af67 commit bd33100
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ We currently only support searching for code on the default branch of a reposito

Results for any search with the new code search (beta) are restricted to 100 results (10 pages). This limitation only applies to searching code with the new code search (beta) and does not apply to other types of searches.

The new code search(beta) supports searching for symbol definitions in code, such as function or class definitions, using the `symbol:` qualifier. However, note that the `symbol:` qualifier only searches for definitions and not references, and not all symbol types or languages are fully supported yet. For a list of what languages are supported, see "[Symbol qualifier](/search-github/github-code-search/understanding-github-code-search-syntax#symbol-qualifier)."
The new code search (beta) supports searching for symbol definitions in code, such as function or class definitions, using the `symbol:` qualifier. However, note that the `symbol:` qualifier only searches for definitions and not references, and not all symbol types or languages are fully supported yet. For a list of what languages are supported, see "[Symbol qualifier](/search-github/github-code-search/understanding-github-code-search-syntax#symbol-qualifier)."
## Feedback and support

You can view and share feedback about the new code search (beta) in our [discussion forum](https://github.com/orgs/community/discussions/categories/code-search-and-navigation).
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Understanding GitHub Code Search (beta) syntax
intro: 'You can build search queries that return the results you want with specialized code qualifiers, regular expressions, and boolean operations.'
intro: 'You can build search queries for the results you want with specialized code qualifiers, regular expressions, and boolean operations.'
allowTitleToDifferFromFilename: true
versions:
feature: github-code-search
Expand All @@ -20,7 +20,7 @@ topics:

The search syntax in this article only applies to searching code with the new code search (beta) enabled. {% data reusables.search.non-code-search-explanation %}

Search queries consist of search terms, consisting of text you want to search for, and qualifiers, which narrow down the search.
Search queries consist of search terms, comprising text you want to search for, and qualifiers, which narrow down the search.

A bare term with no qualifiers will match either the content of a file or the file's path.

Expand Down Expand Up @@ -133,7 +133,7 @@ To search for files within an organization, use the `org:` qualifier. For exampl
org:github
```

To search for files within an organization, use the `user:` qualifier. For example:
To search for files within a personal account, use the `user:` qualifier. For example:

```
user:octocat
Expand Down Expand Up @@ -273,7 +273,7 @@ log4j NOT is:archived
## Using regular expressions
The new code search (beta) supports regular expressions to search for patterns in your code. You can use regular expressions in bare search terms as well as within many qualifiers, by surrounding the regex expression in backslashes.
The new code search (beta) supports regular expressions to search for patterns in your code. You can use regular expressions in bare search terms as well as within many qualifiers, by surrounding the regex in backslashes.
For example, to search for the regular expression `sparse.*index`, you would use:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ For more information about the search syntax of the new code search (beta), see

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, you will be taken to the search results view for that search query.

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 those 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.
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.
1. After typing your query, you can also hit Enter to be taken to the full search results view. 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).
2. Under the search bar, the "Saved searches" section should now show. Click **Create saved search**.
2. Under the search bar, the "Saved searches" section should now appear. Click **Create saved search**.
3. 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**.

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.
Expand All @@ -56,6 +56,6 @@ This search results view already existed for the current search on GitHub, and t

To construct a search query and view, sort, and filter results using a visual interface, you can use {% data variables.search.search_page_url %} or {% data variables.search.advanced_url %}.

If you hit Enter after typing a search query in the search bar, you will also be taken to the search results view.
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 click on filters and sort results.
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 click on filters, and sort results.
2 changes: 1 addition & 1 deletion data/reusables/search/classic-search-code-search-note.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
This article refers to the classic GitHub search experience. If you are participating in the new code search and code view beta and have enabled it, the syntax for searching code and the GitHub.com search interface will differ. However, the search syntax for non-code search types will stay the same. <br><br>
This article refers to the classic GitHub search experience. If you are participating in the new code search and code view beta and have enabled the new functionality, the syntax for searching code and the GitHub.com search interface will differ. However, the search syntax for non-code search types will stay the same. <br><br>

For information about the new code search and code view, currently in limited public beta, see "[About GitHub Code Search (beta)](/search-github/github-code-search/about-github-code-search.md)." To try out the new code search and code view beta, join the [waitlist](https://github.com/features/code-search-code-view/signup).
2 changes: 1 addition & 1 deletion data/reusables/search/code-search-code-view-beta-note.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
The new code search and code view are in limited public beta. To join the waitlist for access, navigate to https://github.com/features/code-search-code-view/signup.
The new code search and code view are in limited public beta. To join the waitlist for access, visit https://github.com/features/code-search-code-view/signup.

0 comments on commit bd33100

Please sign in to comment.