From glean-pack
Optimizes Glean search relevance and indexing throughput using batch sizing, datasource configs, content quality, and incremental/bulk strategies.
npx claudepluginhub jeremylongshore/claude-code-plugins-plus-skills --plugin glean-packThis skill is limited to using the following tools:
Optimize Glean for better search results and faster indexing: tune content quality, batch sizes, and datasource configuration.
Optimizes Glean costs by filtering irrelevant content, pruning stale docs, enabling incremental indexing, and consolidating datasources. For reducing enterprise search indexing volume.
Optimizes Algolia search performance via record size reduction, searchable attributes tuning, replicas, caching, and query parameters. For slow searches and high latency.
Implements full-text search with relevance tuning, facets, autocomplete, fuzzy matching, and synonyms. Guides engine selection for PostgreSQL FTS, Meilisearch, Typesense, Algolia, or Elasticsearch.
Share bugs, ideas, or general feedback.
Optimize Glean for better search results and faster indexing: tune content quality, batch sizes, and datasource configuration.
| Factor | Impact | Action |
|---|---|---|
| Document titles | High | Use descriptive, unique titles |
| Body content | High | Include full text, not just metadata |
| Author info | Medium | Set email for people ranking |
| Updated date | Medium | Keep timestamps current |
| URL structure | Low | Use readable, hierarchical URLs |
// Optimal batch configuration
const BATCH_SIZE = 100; // Max per API call
const CONCURRENT_BATCHES = 3; // Parallel uploads
const DELAY_BETWEEN_MS = 500; // Avoid rate limits
async function indexWithThroughput(docs: GleanDocument[]) {
const batches = chunk(docs, BATCH_SIZE);
const queue = new PQueue({ concurrency: CONCURRENT_BATCHES, interval: DELAY_BETWEEN_MS });
await Promise.all(batches.map((batch, i) =>
queue.add(() => glean.indexDocuments('my_ds', batch))
));
}
| Strategy | When | API Endpoint |
|---|---|---|
Incremental (indexdocuments) | Real-time updates, < 100 docs | /index/v1/indexdocuments |
Bulk (bulkindexdocuments) | Daily full refresh, > 1000 docs | /index/v1/bulkindexdocuments |