Skip to content

Conversation

svemat01
Copy link
Member

Transitions the blog's search functionality to a client-side solution using MiniSearch, and refactors existing search implementations to use a new, reusable hook.

Why these changes are necessary:

  • Removes the dependency on an external Meilisearch instance, simplifying infrastructure and reducing operational overhead.
  • Enhances search performance and responsiveness by conducting searches directly in the browser.
  • Standardizes and centralizes client-side search logic with a generic, cached useSearchIndex hook.

Detailed changes:

  • The blog/search.json endpoint now generates and serves a pre-built MiniSearch index.
  • Introduces a useSearchIndex hook, leveraging TanStack Query, for efficient fetching, loading, and caching of MiniSearch instances.
  • Updates the blog search UI components to integrate with the new client-side search mechanism.
  • Migrates the existing FAQ search to utilize the new generic useSearchIndex hook, improving consistency.
  • Removes the Meilisearch deployment GitHub Actions workflow.

Introduce robust client-side search functionality for both blog posts and ENS FAQs.

Utilize MiniSearch to build and query search indices directly in the browser, improving responsiveness and reducing server load.

Add dedicated API routes to generate and serve pre-built MiniSearch JSON indices for blog posts and ENS FAQs.

Develop a generic `useSearchIndex` hook to fetch and load these indices efficiently using TanStack Query for caching and improved performance.

Update blog search results to consume the new client-side search logic.

Refactor FAQ search to use the new reusable search index hook, enhancing type safety and code reusability.

Integrate `QueryClientProvider` into the ENSv2 layout to support TanStack Query for future data fetching.
@cloudflare-workers-and-pages
Copy link

Deploying ensdomains-v2 with  Cloudflare Pages  Cloudflare Pages

Latest commit: a72b049
Status: ✅  Deploy successful!
Preview URL: https://f5d62a27.ensdomains-v2.pages.dev
Branch Preview URL: https://feat-blog-minisearch.ensdomains-v2.pages.dev

View logs

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.

1 participant