Use this file to discover Exa products, pricing, evaluations, comparisons, use cases, agent interfaces, and technical documentation before exploring further.
JavaScript fuzzy search libraries match a query against a list of strings or objects even when the spelling differs. Each library scores how closely the query's characters appear in an item and returns the items ranked by that score. These libraries run the command palettes, autocomplete boxes, and quick filters in web apps and code editors.
Popularity
fuzzysort has the most monthly downloads in this comparison, at 77.8M.
function search(index: ReturnType<typeof emptyIndex>, input: FileSystem.FindInput) {
const items =
input.type === "file"
? Array.from(index.files.values())
: input.type === "directory"
? Array.from(index.directories.values())
: [...index.files.values(), ...index.directories.values()]
const result = fuzzysort.go(input.query, items, { limit: input.limit ?? 50 })
// Targets are owned by the current location index. The only global fuzzysort // state left is its query cache, which must not retain every query forever. fuzzysort.cleanup()
return result.map((item) => {
const relative = item.target
const type = relative.endsWith(path.sep) ? ("directory" as const) : ("file" as const)
return FileSystem.Entry.make({
path: RelativePath.make(relative),
type,
})
})
}
fuse.js
Searches text and object fields using approximate string matching.
Downloads / mo
76.1M
Stars
20.5K
Last release
7.5.0
License
Apache-2.0
Strengths
Weights different text fields.Give title matches more weight than description matches.
Moves matching into browser workers.Use FuseWorker for searches that return promises.
Limitations
Penalizes matches far into text.Set ignoreLocation to match text regardless of its starting position.
Worker mode excludes token search.Use the standard Fuse class when enabling useTokenSearch.
Fuse.js fits searching objects with weighted fields. fuzzysort fits ranking short strings such as file names, and match-sorter fits a filter box that needs a predictable ranking order.
Fuzzy search finds items that match a query approximately rather than exactly. A fuzzy matcher still finds an item when the query skips letters or contains a typo.
Fuse.js is a fuzzy-search library with no dependencies that searches strings and object fields in the browser or on a server. Weighted keys let title matches rank above description matches.
fuzzysort matches the query's characters in order and ranks short strings such as file names. Fuse.js scores approximate matches across weighted object fields.
Fuse.js scores a match lower the farther it starts from the expected location. Setting ignoreLocation to true removes that penalty.
For coding agents
Found your fuzzy search library? Help your agent use it.
Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.