Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/filtered-generate-includes.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/search-ranking-page-match.md

This file was deleted.

16 changes: 16 additions & 0 deletions packages/leadtype/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# leadtype

## 0.6.0

### Minor Changes

- 993a4af: Rank docs search results by the page they come from, not only by term counts. Regenerate search artifacts with this release: the index format is now version 4. The browser search client, MCP artifact loading and NLWeb `/ask` reject a version 3 index with an error that says to regenerate, instead of searching it with the new tokenizer and quietly missing matches.

- A chunk's score is multiplied by how much of the query its page title, URL path and own heading cover. A page titled "Consent categories" now outranks a release note that repeats both words, and `vue quickstart` finds `/docs/frameworks/vue/quickstart` when the title is only "Quickstart". URL path words a page doesn't already use are indexed once, so a page that matches only through its URL is still found.
- Camel-case names index their parts and short dotted or hyphenated names index their joined form, so `consent banner` matches a page titled `ConsentBanner` and `nextjs` matches "Next.js".
- A page's description is indexed with its first chunk only. Repeating it in every chunk let pages with long descriptions outrank the sections that answer the query. The index is also smaller.
- `searchDocs` returns at most two chunks per page before applying `limit`. Set `maxResultsPerPage` to change this. NLWeb `/ask` uses `maxResultsPerPage: 1`, so it now fills its result limit instead of returning fewer results after removing duplicate pages.
- Queries with two or more words skip phrase matching for chunks that cannot reach the results, which makes broad queries several times faster on large indexes.

### Patch Changes

- 00f55ce: `generate` with `--include`/`--exclude`, or with a collection's `include`/`exclude`, now resolves `<include>` partials that the filters leave out. Before, the filtered temp mirror held only the matched pages, so these includes failed with `ENOENT` and left an `[Error: Could not include file ...]` marker in the page. Relative includes in a staged page now resolve next to the original source file, and the partials are still not output as pages. A missing include still warns, and the warning now names the real source file instead of the temp mirror.

## 0.5.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/leadtype/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "leadtype",
"version": "0.5.0",
"version": "0.6.0",
"description": "Framework-neutral docs pipeline tooling for MDX, LLM bundles, and search",
"type": "module",
"license": "MIT",
Expand Down
Loading