glean-search

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

glean search

glean search

PREREQUISITE: Read
../glean-shared/SKILL.md
for auth, global flags, and security rules.
Search for content in your Glean instance. Results are JSON.
bash
glean search [flags]
前提条件: 请阅读
../glean-shared/SKILL.md
了解认证、全局标志和安全规则。
在你的Glean实例中搜索内容,结果以JSON格式返回。
bash
glean search [flags]

Flags

标志参数

FlagTypeDefaultDescription
--datasource
[]stringFilter by datasource (repeatable)
--disable-query-autocorrect
booleanfalseDisable automatic query corrections
--disable-spellcheck
booleanfalseDisable spellcheck
--dry-run
booleanfalsePrint request body without sending
--facet-bucket-size
integer10Maximum facet buckets per result
--fetch-all-datasource-counts
booleanfalseReturn counts for all datasources
--json
stringComplete JSON request body (overrides individual flags)
--max-snippet-size
integer0Maximum snippet size in characters
--output
json | ndjson | textjsonOutput format
--page-size
integer10Number of results per page
--query
stringSearch query (positional arg) (required)
--query-overrides-facet-filters
booleanfalseAllow query operators to override facet filters
--response-hints
[]string[RESULTS QUERY_METADATA]Response hints
--return-llm-content
booleanfalseReturn expanded LLM-friendly content
--tab
[]stringFilter by result tab IDs (repeatable)
--timeout
integer30000Request timeout in milliseconds
--type
[]stringFilter by document type (repeatable)
标志类型默认值描述
--datasource
[]string按数据源筛选(可重复使用)
--disable-query-autocorrect
booleanfalse禁用查询自动修正
--disable-spellcheck
booleanfalse禁用拼写检查
--dry-run
booleanfalse打印请求体但不发送请求
--facet-bucket-size
integer10每个结果的最大分面桶数量
--fetch-all-datasource-counts
booleanfalse返回所有数据源的结果数量
--json
string完整的JSON请求体(会覆盖单个标志参数)
--max-snippet-size
integer0摘要的最大字符数
--output
json | ndjson | textjson输出格式
--page-size
integer10每页结果数量
--query
string搜索查询(位置参数)(必填)
--query-overrides-facet-filters
booleanfalse允许查询操作符覆盖分面筛选器
--response-hints
[]string[RESULTS QUERY_METADATA]响应提示
--return-llm-content
booleanfalse返回适合LLM的扩展内容
--tab
[]string按结果标签ID筛选(可重复使用)
--timeout
integer30000请求超时时间(毫秒)
--type
[]string按文档类型筛选(可重复使用)

Examples

示例

bash
glean search "vacation policy" | jq '.results[].document.title'
glean search --json '{"query":"Q1 reports","pageSize":5,"datasources":["confluence"]}' | jq .
bash
glean search "vacation policy" | jq '.results[].document.title'
glean search --json '{"query":"Q1 reports","pageSize":5,"datasources":["confluence"]}' | jq .

Discovering Commands

命令探索

bash
undefined
bash
undefined

Show machine-readable schema for this command

显示此命令的机器可读模式

glean schema search
glean schema search

List all available commands

列出所有可用命令

glean schema | jq '.commands'
undefined
glean schema | jq '.commands'
undefined