0
0
Fork 0
mirror of https://codeberg.org/forgejo/docs.git synced 2024-12-26 22:51:22 -05:00
forgejo-docs/docs/user/code-search.md
Shiny Nematoda 9a59b851f3 Add screenshots for code search (#715)
reflect changes made in forgejo/forgejo#4134

Reviewed-on: https://codeberg.org/forgejo/docs/pulls/715
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
2024-06-22 20:01:14 +00:00

1.1 KiB

title license
Code Search CC-BY-SA-4.0

Forgejo supports code search through an indexer and git-grep as a fallback when REPO_INDEXER_ENABLED is disabled.

Basic (git-grep)

Code search results page using git-grep

If REPO_INDEXER_ENABLED is set to false, the code search function will be limited to a single repository and will use git-grep.

Currently, only fixed strings are supported and any case differences are ignored. The search results will include the matched line, along with a single line before and after the match.

Since, the searches are performed in the fly they may be performed on any valid branch or tag.

Indexer

Code search results page using indexer

For advanced search queries and searching across an entire organisation or instance, REPO_INDEXER_ENABLED: true enables code search via bleve/elasticsearch.

However, search results are limited to the HEAD of the repository.