Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Dec 5, 2025

Summary

Adds support for searching multiple price feeds simultaneously in the Lazer price feed IDs table. Users can now enter comma or space-separated search terms to find multiple feeds at once.

Example usage:

  • BTC ETH - shows feeds matching either BTC or ETH
  • BTC, ETH, SOL - shows feeds matching any of the three terms
  • sol, btc, 925 - shows SOL feeds, BTC feeds, and the feed with ID 925 (with ID 925 appearing first)
  • Single terms continue to work as before (with fuzzy matching)

Rationale

This was requested in Slack by a user who wanted to search for multiple feeds at once on the Lazer price feed IDs page. This feature was previously implemented in the documentation repo (PR #900) and now needs to be ported to the pyth-crosschain repo where the developer-hub code now lives.

Updates since last revision

  1. Fixed multi-term search to use exact/substring matching instead of fuzzy matchSorter. The original implementation used matchSorter for all terms, which caused fuzzy matching to dominate results with the most common term (e.g., "sol, btc, 925" only showed SOL results).

  2. Added priority ordering for exact ID matches. When searching for numeric IDs (e.g., 925), those exact matches now appear first in results, followed by other matches sorted by ID.

Multi-term search behavior:

  • Numeric terms (e.g., 925) → exact ID match against pyth_lazer_id (appears first in results)
  • Text terms (e.g., btc) → case-insensitive substring match on symbol, name, or description
  • Results are deduplicated by pyth_lazer_id

Single-term search still uses matchSorter for fuzzy ranking.

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code

Verified in browser that searching sol, btc, 925 now shows:

  1. Feed with ID 925 (ABBOTT LABORATORIES) first
  2. BTC-related feeds (BITCOIN / US DOLLAR)
  3. SOL-related feeds (SOLANA / US DOLLAR)

ESLint and TypeScript type checking pass.

Human Review Checklist

  • Verify exact ID matches appear first in results (e.g., sol, btc, 925 shows ID 925 first)
  • Verify numeric ID exact matching works (e.g., 925 finds only the feed with pyth_lazer_id 925)
  • Verify text substring matching works (e.g., btc finds BTC-related feeds)
  • Verify OR logic across multiple terms (e.g., sol, btc shows both SOL and BTC feeds)
  • Consider if the different behavior between single-term (fuzzy) and multi-term (exact/substring) search is acceptable

Link to Devin run: https://app.devin.ai/sessions/aaafcb5191834d438ac7b2db192e324c
Requested by: aditya@dourolabs.xyz

…ce feed IDs

Users can now search for multiple feeds simultaneously by entering
comma or space-separated search terms. For example:
- 'BTC ETH' shows feeds matching either BTC or ETH
- 'BTC, ETH, SOL' shows feeds matching any of the three terms

The search uses OR logic - a feed is shown if it matches ANY of the
search terms.

Co-Authored-By: aditya@dourolabs.xyz <aditya@dourolabs.xyz>
@vercel vercel bot temporarily deployed to Preview – insights December 5, 2025 19:19 Inactive
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@vercel
Copy link

vercel bot commented Dec 5, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
component-library Ready Ready Preview Comment Dec 5, 2025 8:01pm
developer-hub Ready Ready Preview Comment Dec 5, 2025 8:01pm
5 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
api-reference Skipped Skipped Dec 5, 2025 8:01pm
entropy-explorer Skipped Skipped Dec 5, 2025 8:01pm
insights Skipped Skipped Dec 5, 2025 8:01pm
proposals Skipped Skipped Dec 5, 2025 8:01pm
staking Skipped Skipped Dec 5, 2025 8:01pm

The previous implementation used matchSorter for multi-term search which
caused fuzzy matching to dominate results with the most common term.

For multi-term search (comma/space separated), now uses:
- Exact ID match for numeric terms (e.g., '925' matches pyth_lazer_id 925)
- Case-insensitive substring match for text terms on symbol, name, description

Single-term search still uses matchSorter for fuzzy ranking.

Co-Authored-By: aditya@dourolabs.xyz <aditya@dourolabs.xyz>
- Exact ID matches now appear first in search results
- Other matches are sorted by ID for consistent ordering
- Fixes issue where ID 925 was buried in results when searching 'sol, btc, 925'

Co-Authored-By: aditya@dourolabs.xyz <aditya@dourolabs.xyz>
@aditya520 aditya520 merged commit b8adf02 into main Dec 5, 2025
9 of 10 checks passed
@aditya520 aditya520 deleted the devin/1764962088-multi-feed-search branch December 5, 2025 20:10
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