glean-cli-search

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

glean search

Glean 搜索

PREREQUISITE: Read
../glean-cli-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-cli-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