From 970f8a24f0a7c088d813d247c7f181666b824f99 Mon Sep 17 00:00:00 2001 From: Shiny Nematoda Date: Mon, 6 May 2024 11:41:38 +0000 Subject: [PATCH] update code search (forgejo/forgejo#3654) --- docs/user/code-search.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/user/code-search.md b/docs/user/code-search.md index b2cf457f..ea6cc92f 100644 --- a/docs/user/code-search.md +++ b/docs/user/code-search.md @@ -9,8 +9,12 @@ Forgejo supports code search through an indexer and `git-grep` as a fallback whe If `REPO_INDEXER_ENABLED` is set to `false`, the code search function will be limited to a single repository and will use [`git-grep`](https://git-scm.com/docs/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 context of three lines before and after the match. The search query will be executed on the default branch of the repository. +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 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.