Skip to content

Conversation

@martijnvdbrug
Copy link
Member

@martijnvdbrug martijnvdbrug commented Jan 27, 2026

Description

Large improvement to make the better search plugin yield more relevant results, but also making it more performant to run in Vendure's main API instance.

See Project Description below for extensive documentation of this project.

To do before merge

  • Example: Migrate DB before merging

Breaking changes

Example: Graphql field X was removed

Screenshots

You can add screenshots here if applicable.

Checklist

📌 Always:

  • Set a clear title
  • I have checked my own PR

👍 Most of the time:

  • Added or updated test cases
  • Updated the README

📦 For publishable packages:

  • Increased the version number in package.json
  • Added changes to the CHANGELOG.md

Project Description

This plugin offers more intuitive search than Vendure's DefaultSearchPlugin before the need of an external platform like TypeSense or ElasticSearch.

This plug is meant for small to medium sized shops with up to ~10000 variants.

Analysis & Proof of Concept Phase

Goals

  1. Performant in-memory search, without affecting customer-facing API calls.
  2. Provide relevant, type-tolerant (fuzzy matching) search results, while still meeting goal 1
  3. Extensible with custom fields and custom field weighting.

This plugin is not meant to be a replacement for Elasticsearch or Typesense, but rather a lightweight alternative for small- to medium-sized shops. If you want to test if it works for you, give it a try and run the load tests we have included.

Requirements

  • Provide relevant, type-tolerant (fuzzy matching) search results
  • Performant in-memory search, without affecting customer-facing API calls (without blocking the node event loop) without sacrificing relevance
  • Must be configurable: After researching relevance, it became clear relevance is not only technical but also domain-specific. Consumers of the plugin should be able to boost specific fields, as well as boosting specific documents in the result set.
  • Include search analytics so that relevance can be tuned based on live customer data. Crucial for optimal relevance.

Approach

  1. Which candidate has the best relevance?
    • How to test relevance?
    • Candidates: Minisearch, Orama, FlexSearch or complete custom. Each of these requires customisation for proper e-commerce relevance.
  2. Take the best-performing solution, and test for performance
    • What performance do we need? What are the requirements

Benchmarks

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

Walkthrough

A TODO comment and blank lines were added to the README file. No functional changes or logic modifications are present.

Changes

Cohort / File(s) Summary
Documentation
packages/vendure-plugin-better-search/README.md
Added TODO comment and blank lines (+2 lines)

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 4
❌ Failed checks (3 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The linked issue #123 is about Picqer API URL updates and channel defaults, but this PR only modifies a better-search README with a TODO comment—completely unrelated requirements. Verify the correct issue is linked, or move these changes to the appropriate PR for the linked issue.
Out of Scope Changes check ⚠️ Warning The PR description claims search improvements but contains only a TODO comment in a README file, which is entirely out of scope with the linked Picqer API issue. Either implement the claimed search improvements or link the correct issue that matches the README change.
Description check ⚠️ Warning The PR description is a template with placeholder text and examples that doesn't match the actual changeset, which only adds a TODO comment to README. Update the PR description to accurately reflect the minimal change: just a TODO comment added to the README file. Remove template placeholders and provide concrete details about what this change accomplishes.
Title check ❓ Inconclusive The title mentions 'better-search' and 'readme' but the actual changes only add a TODO comment to a README file with no feature implementation. Clarify if this is a WIP PR or if the title should reflect the actual changes (e.g., 'chore: add TODO to better-search README').
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@packages/vendure-plugin-better-search/README.md`:
- Around line 17-18: Replace the JavaScript-style line "// TODO fix everything
below this line" in the README.md with proper Markdown (remove the `//`) and
either delete the vague TODO or replace it with a clear, actionable note
describing what needs updating (e.g., "TODO: update README to document
better-search plugin features and usage – list specific sections to update").
Also update the PR description/title to reflect the actual change (better-search
README) and remove or correct the incorrect reference to Issue `#123` so the PR
only references relevant issues; ensure any TODO references include owner and
acceptance criteria.

Comment on lines +17 to +18
// TODO fix everything below this line

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Invalid comment syntax and PR mismatch.

Three issues:

  1. // is JavaScript syntax, not Markdown. This will display as literal text to users, not as a comment.
  2. The PR objectives reference Issue #123 (Picqer API endpoint changes), but this PR only modifies the better-search README—completely unrelated.
  3. "Fix everything below this line" is vague with no context.
🤖 Prompt for AI Agents
In `@packages/vendure-plugin-better-search/README.md` around lines 17 - 18,
Replace the JavaScript-style line "// TODO fix everything below this line" in
the README.md with proper Markdown (remove the `//`) and either delete the vague
TODO or replace it with a clear, actionable note describing what needs updating
(e.g., "TODO: update README to document better-search plugin features and usage
– list specific sections to update"). Also update the PR description/title to
reflect the actual change (better-search README) and remove or correct the
incorrect reference to Issue `#123` so the PR only references relevant issues;
ensure any TODO references include owner and acceptance criteria.

@martijnvdbrug martijnvdbrug marked this pull request as draft February 4, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants