From 2d2ac6fc0d53f08925d368730e9f7dab88dfab67 Mon Sep 17 00:00:00 2001 From: David Moraes Date: Sun, 7 Sep 2025 22:29:21 -0300 Subject: [PATCH] Fix search endpoint documentation and navigation --- api-reference/introduction.mdx | 2 +- api-reference/search.mdx | 12 ++++++++++++ api-reference/search.txt | 14 -------------- docs.json | 1 + 4 files changed, 14 insertions(+), 15 deletions(-) create mode 100644 api-reference/search.mdx delete mode 100644 api-reference/search.txt diff --git a/api-reference/introduction.mdx b/api-reference/introduction.mdx index df09d0a..2032a6f 100644 --- a/api-reference/introduction.mdx +++ b/api-reference/introduction.mdx @@ -32,7 +32,7 @@ We offer a growing list of [first-party integrations](https://app.greptile.com/l - Optionally, use [`POST /search`](/api-reference/query) to search the repo or repos in natural language and get back just the list of relevant files, functions, classes etc., not the answer. + Optionally, use [`POST /search`](/api-reference/search) to search the repo or repos in natural language and get back just the list of relevant files, functions, classes etc., not the answer. diff --git a/api-reference/search.mdx b/api-reference/search.mdx new file mode 100644 index 0000000..e252cb7 --- /dev/null +++ b/api-reference/search.mdx @@ -0,0 +1,12 @@ +--- +title: 'Search Repo(s)' +openapi: 'POST /search' +--- + +Submit a natural language search query to find relevant code references without generating an AI response. + +Returns a list of relevant code files, functions, and snippets based on your search query, similar to the query endpoint but **without the AI-generated answer**. + +Use this endpoint when you only need the source references and don't need an AI explanation. + +Note: Before Greptile can search a repo, it must be indexed. See [Index Repository](/api-reference/index) for more information. \ No newline at end of file diff --git a/api-reference/search.txt b/api-reference/search.txt deleted file mode 100644 index 366682e..0000000 --- a/api-reference/search.txt +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: 'Search Repo(s)' -openapi: 'POST /search' ---- - -Submit a natural language query about the codebase, get a list of relevant code references (filepaths, line numbers, etc). - -*Examples* - -1. "Code to provision new API keys" -2. "Functions that use recursion" -3. "Code that touches session management in any way" - -Note: Before Greptile can search a repo, it must be indexed. See [Index Repository](/api-reference/index) for more information. \ No newline at end of file diff --git a/docs.json b/docs.json index 6819f8c..c0be2a9 100644 --- a/docs.json +++ b/docs.json @@ -55,6 +55,7 @@ "api-reference/index", "api-reference/get-repository", "api-reference/query", + "api-reference/search", "api-reference/zapier" ] }