Knowledge Base & Content Management

Full-Text Search

Definition

Full-text search indexes the entire text of every document and enables queries against this index. When a user searches for 'export CSV', full-text search finds all articles containing those words, ranked by how frequently and prominently they appear. The most widely used algorithm is BM25 (Best Match 25), which considers term frequency (how often the term appears in the document), inverse document frequency (how rare the term is across all documents), and document length normalization. Full-text search excels at finding exact matches — product names, error codes, feature names — that semantic search might not handle as precisely.

Why It Matters

Full-text search is the foundation of any knowledge base discovery system. It handles the large category of queries where users know the exact terminology — searching for a specific error code, a product feature name, or an exact phrase from the documentation. Without full-text search, these precise queries would either fail or require semantic search to make lucky connections. Full-text search and semantic search are complementary — each covers the cases the other misses.

How It Works

Full-text search is implemented using a search engine like Elasticsearch or its open-source alternatives. At ingestion, documents are tokenized, stemmed (reducing words to root forms), and indexed in an inverted index mapping terms to document IDs and positions. At query time, the query terms are processed the same way and matched against the index. BM25 scoring ranks results by relevance. The search engine supports boolean operators (AND, OR, NOT), phrase queries, and field-specific queries (search only in titles).

Full-Text Search Mechanics

User Query

"reset password"

Tokenize

resetpassword

Stop-word removal

resetpassword

(no stops here)

Stemming

passwordspassword

Index Lookup

Match stemmed tokens

BM25 Scoring

Term freq + inverse doc freq

Ranked Results

1.Reset your password
0.94
2.Password policy guide
0.71
3.Account security settings
0.58

Real-World Example

A developer searches the knowledge base for 'ERR_SSL_CERT_INVALID' — a precise error code. Full-text search finds the one article that contains this exact string and returns it immediately at the top of results. Semantic search would struggle with this because an error code has no semantic meaning beyond its exact string — there is nothing to reason about conceptually. Full-text search handles these precise lookups reliably.

Common Mistakes

  • Relying only on full-text search without semantic search — users who describe problems in their own words without knowing the exact terminology get poor results.
  • Not configuring synonym handling — users might search 'invoice' when articles use 'billing statement', and without synonym mapping these queries miss relevant content.
  • Not applying stemming and normalization — a search for 'integrating' should match articles about 'integration', not require the exact word form.

Related Terms

Ready to build your AI chatbot?

Put these concepts into practice with 99helpers — no code required.

Start free trial →
What is Full-Text Search? Full-Text Search Definition & Guide | 99helpers | 99helpers.com