Document[Go-develop]: update Go development docs (#16229)

### What problem does this PR solve?

Document updated:

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Haruko386
2026-06-23 19:19:44 +08:00
committed by GitHub
parent 5046626c17
commit d89e29fba8

View File

@@ -473,7 +473,7 @@ RAGFlow(api/default)> DROP CHUNK STORE FOR DATASET 'test'
- Search chunks
```
RAGFlow(api/default)> SEARCH 'AI' ON DATASETS 'test'
RAGFlow(api/default)> RETRIEVE 'AI' ON DATASETS 'test'
```
- Get chunks
@@ -519,35 +519,55 @@ RAGFlow(api/default)> GET METADATA OF DATASET 'test' 'test2'
### 6.29. Search datasets
- Search datasets
- Search datasets using SQL-like dataset search syntax:
```
RAGFlow(api/default)> SEARCH 'AI' ON DATASETS 'test';
RAGFlow(api/default)> RETRIEVE 'AI' ON DATASETS 'test';
RAGFlow(api/default)> SEARCH 'AI' ON DATASETS 'test1' 'test2';
RAGFlow(api/default)> RETRIEVE 'AI' ON DATASETS 'test1, test2';
RAGFlow(api/default)> SEARCH 'AI' ON DATASETS 'test' WITH top_k 1;
RAGFlow(api/default)> RETRIEVE 'AI' ON DATASETS 'test' WITH top_k 1;
RAGFlow(api/default)> SEARCH 'AI' ON DATASETS 'test' WITH page 2 page_size 20;
RAGFlow(api/default)> RETRIEVE 'AI' ON DATASETS 'test' WITH page 2 page_size 20;
RAGFlow(api/default)> SEARCH 'AI' ON DATASETS 'test' WITH similarity_threshold 0.5;
RAGFlow(api/default)> RETRIEVE 'AI' ON DATASETS 'test' WITH similarity_threshold 0.5;
RAGFlow(api/default)> SEARCH 'AI' ON DATASETS 'test' WITH vector_similarity_weight 0.0;
RAGFlow(api/default)> RETRIEVE 'AI' ON DATASETS 'test' WITH vector_similarity_weight 0.0;
RAGFlow(api/default)> SEARCH 'AI' ON DATASETS 'test' WITH keyword true;
RAGFlow(api/default)> RETRIEVE 'AI' ON DATASETS 'test' WITH keyword true;
RAGFlow(api/default)> SEARCH 'AI' ON DATASETS 'test' WITH use_kg true;
RAGFlow(api/default)> RETRIEVE 'AI' ON DATASETS 'test' WITH use_kg true;
RAGFlow(api/default)> SEARCH 'AI' ON DATASETS 'test' WITH rerank_id 'BAAI/bge-reranker-v2-m3@CI@SILICONFLOW';
RAGFlow(api/default)> RETRIEVE 'AI' ON DATASETS 'test' WITH rerank_id 'BAAI/bge-reranker-v2-m3@CI@SILICONFLOW';
RAGFlow(api/default)> SEARCH 'AI' ON DATASETS 'test' WITH search_id 'abc123';
RAGFlow(api/default)> RETRIEVE 'AI' ON DATASETS 'test' WITH search_id 'abc123';
RAGFlow(api/default)> SEARCH 'AI' ON DATASETS 'test' WITH cross_languages ['Chinese'];
RAGFlow(api/default)> RETRIEVE 'AI' ON DATASETS 'test' WITH cross_languages ['Chinese'];
RAGFlow(api/default)> SEARCH 'AI' ON DATASETS 'test' WITH doc_ids ['doc_a', 'doc_b'];
RAGFlow(api/default)> RETRIEVE 'AI' ON DATASETS 'test' WITH doc_ids ['doc_a', 'doc_b'];
RAGFlow(api/default)> SEARCH 'AI' ON DATASETS 'test' WITH meta_data_filter '{"method":"auto"}';
RAGFlow(api/default)> RETRIEVE 'AI' ON DATASETS 'test' WITH meta_data_filter '{"method":"auto"}';
RAGFlow(api/default)> SEARCH 'AI' ON DATASETS 'test' WITH meta_data_filter '{"method":"manual","conditions":[{"key":"author","op":"eq","value":"Luo"}]}';
RAGFlow(api/default)> RETRIEVE 'AI' ON DATASETS 'test' WITH meta_data_filter '{"method":"manual","conditions":[{"key":"author","op":"eq","value":"Luo"}]}';
RAGFlow(api/default)> SEARCH 'AI' ON DATASETS 'test' WITH top_k 50 similarity_threshold 0.5 vector_similarity_weight 0.5 use_kg true;
```
RAGFlow(api/default)> RETRIEVE 'AI' ON DATASETS 'test' WITH top_k 50 similarity_threshold 0.5 vector_similarity_weight 0.5 use_kg true;
```
- Search datasets using filesystem-style search syntax:
```
RAGFlow(api/default)> search "AI" # search all datasets
RAGFlow(api/default)> search "AI" datasets/test # search only dataset 'test'
RAGFlow(api/default)> search "AI" datasets/test -n 20 # return top 20 results
RAGFlow(api/default)> search "AI" datasets 'test1' 'test2' # search in datasets
```
> [!Note]
> - `search` is the simple filesystem search command and only accepts `query [path] [-n number]`.
> - `RETRIEVE` / `SEARCH ... ON DATASETS ...` is the SQL-like search command and supports full `WITH` option expansion.
> - `WITH` options include: `top_k`, `page_size`, `page`, `similarity_threshold`, `vector_similarity_weight`, `keyword`, `use_kg`, `rerank_id`, `search_id`, `cross_languages`, `doc_ids`, and `meta_data_filter`.
- Example with multiple options:
```
RAGFlow(api/default)> RETRIEVE 'AI' ON DATASETS 'test' WITH top_k 50 similarity_threshold 0.5 vector_similarity_weight 0.5 use_kg true;
```