Advanced Search & Filtering

Implement full-text search and multi-criteria filtering for course catalogs.

Updated Aug 21, 2021
One-click install
npx skills add https://github.com/ZouZou/angular-sample-app --skill advanced-search-filtering
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Advanced Search & Filtering
Source: https://github.com/ZouZou/angular-sample-app/tree/main/.claude/skills/advanced-search
Command: npx skills add https://github.com/ZouZou/angular-sample-app --skill advanced-search-filtering

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables users to perform fast, relevant searches across courses and content with advanced filtering, facet counts, and autocomplete suggestions.

Core Features & Use Cases

  • Full-text search: PostgreSQL FTS or Elasticsearch for course, lesson, and content search.
  • Advanced filters & facets: Multi-criteria filtering with category, level, price, and rating facets.
  • Autocomplete & analytics: Instant suggestions and search history for insights.

Quick Start

Query for "data structures" and review results with category and level facets.

Frequently Asked Questions about Advanced Search & Filtering

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement full-text search across course catalogs with PostgreSQL or Elasticsearch?

Full-text search uses PostgreSQL Full-Text Search or Elasticsearch to index and query course content, lessons, and metadata. Both engines tokenize text, rank results by relevance, and support phrase queries and boolean operators. PostgreSQL FTS is lightweight for smaller datasets; Elasticsearch scales for millions of documents and provides advanced analytics.

What's the best way to add faceted filtering and multi-criteria filtering to search results?

Faceted filtering aggregates counts of distinct values—category, level, price, rating—alongside search results, letting users narrow results interactively. A query builder processes filter selections, applies WHERE constraints, and regenerates facet counts. This enables users to explore data without rebuilding searches manually.

Can I add autocomplete and search suggestions to a course search interface?

Autocomplete suggests completions and past searches as users type, powered by prefix matching or fuzzy matching algorithms. Storing search history and term frequency enables instant suggestions. Combined with full-text indexing, autocomplete reduces query time and improves user discovery of courses.

Do I need Elasticsearch for advanced search, or can PostgreSQL handle it?

PostgreSQL Full-Text Search handles advanced search for small to medium datasets with built-in ranking and phrase support. Elasticsearch excels at scale, fuzzy matching, and analytics across millions of documents. Choose PostgreSQL for simplicity and lower operational overhead; pick Elasticsearch for high query volume, complex analytics, and large indexes.

How do I rank search results by relevance, and what other sort modes are available?

Relevance ranking scores results by term frequency, proximity, and field weights using TF-IDF or BM25 algorithms in PostgreSQL FTS or Elasticsearch. Alternate sort modes include price, rating, duration, instructor, and recency. A query builder exposes sort selection, letting users toggle between relevance and domain-specific criteria.

What analytics and insights can I gather from search queries and user behavior?

Search analytics track query frequency, click-through rates, zero-result queries, and filter patterns. This data reveals popular courses, missing content, and user intent. Saved searches and search history enable personalization and identify trending topics, informing content strategy and UX improvements.