diff --git a/docs/_images/user/code-search/gitgrep.png b/docs/_images/user/code-search/gitgrep.png new file mode 100644 index 00000000..a3aa4d58 Binary files /dev/null and b/docs/_images/user/code-search/gitgrep.png differ diff --git a/docs/_images/user/code-search/indexer.png b/docs/_images/user/code-search/indexer.png new file mode 100644 index 00000000..e9741356 Binary files /dev/null and b/docs/_images/user/code-search/indexer.png differ diff --git a/docs/user/code-search.md b/docs/user/code-search.md index dde32ef8..5f92aad5 100644 --- a/docs/user/code-search.md +++ b/docs/user/code-search.md @@ -7,6 +7,8 @@ Forgejo supports code search through an indexer and `git-grep` as a fallback whe # Basic (git-grep) +![Code search results page using git-grep](../_images/user/code-search/gitgrep.png) + 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 single line before and after the match. @@ -15,6 +17,8 @@ Since, the searches are performed in the fly they may be performed on any valid # Indexer -For advanced search queries and searching across an entire organization or instance, `REPO_INDEXER_ENABLED: true` enables code search via bleve/elasticsearch. +![Code search results page using indexer](../_images/user/code-search/indexer.png) + +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.