mirror of
https://codeberg.org/forgejo/docs.git
synced 2024-11-24 18:09:26 -05:00
6cc672040b
ref: https://codeberg.org/forgejo/forgejo/pulls/1594 Preview: https://forgejo.codeberg.page/@docs_pull_444/docs/next/user/code-search/ Reviewed-on: https://codeberg.org/forgejo/docs/pulls/444 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Shiny Nematoda <snematoda@noreply.codeberg.org> Co-committed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
846 B
846 B
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)
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, as well as a single line before and after the match. The search query will be executed on the default branch of the repository.
Indexer
For advanced search queries and searching across an entire organisation or instance, REPO_INDEXER_ENABLED: true
enables code search via bleve/elasticsearch.