Support Thread

Fulltext Search Issues Not Returning Any Results

Fulltext Search Issues Not Returning Any Results — APG vNext Guide

Fulltext Search Issues Not Returning Any Results — this archived support thread from the APG vNext community covers a reported issue and its resolution.

Troubleshooting This Issue

  1. Set customErrors mode="Off" in web.config to expose the full error and stack trace.
  2. Check Windows Event Viewer → Application log for ASP.NET exceptions.
  3. Review Admin Panel → Logs → Error Log for timestamped application errors.
  4. Restart the IIS Application Pool to clear stale state.
  5. Verify the database connection string and run any pending upgrade SQL scripts.

Related Resources

Full-Text Search Not Returning Results in APG vNext

When APG vNext full-text search returns zero results for queries that should match existing posts, the cause is almost always one of four things: the FTS index is not populated, the FTS catalog is in an error state, the database collation is incompatible with the search language, or the query contains only stopwords.

Step 1: Verify the FTS Catalog Status

SELECT name, is_default, is_accent_sensitivity_on
FROM   sys.fulltext_catalogs;

SELECT FULLTEXTCATALOGPROPERTY('apg_FTSCatalog', 'PopulateStatus') AS Status,
       FULLTEXTCATALOGPROPERTY('apg_FTSCatalog', 'ItemCount')       AS Items;
-- Status 0 = idle (done). If 0 and ItemCount = 0, index is empty.

Step 2: Rebuild the FTS Index

-- Full rebuild:
ALTER FULLTEXT CATALOG apg_FTSCatalog REBUILD;

-- Watch population progress (run every 30 seconds):
SELECT FULLTEXTCATALOGPROPERTY('apg_FTSCatalog','PopulateStatus'),
       FULLTEXTCATALOGPROPERTY('apg_FTSCatalog','ItemCount');

Step 3: Test the FTS Query Directly

-- Test search bypassing APG vNext application layer:
SELECT TOP 10 PostID, PostContent
FROM   apg_Posts
WHERE  CONTAINS(PostContent, 'yourSearchTerm');
-- If this returns results but the forum search doesn't, the issue is in APG's search code

Step 4: Check for Stopword Filtering

Short, common words (the, and, is, in) are stopwords and are excluded from FTS queries. If every word in a search query is a stopword, zero results are returned. Test with a less common term to confirm.

Step 5: APG vNext Search Fallback Mode

<!-- Enable LIKE-based search fallback when FTS returns zero results -->
<add key="APG.Search.FallbackToLike"     value="true" />
<add key="APG.Search.FallbackThreshold"  value="0" />
<!-- If FTS returns 0 results, fall back to LIKE search -->

Related Resources

APG vNext Search Relevance Tuning

SQL Server Full-Text Search ranks results using a relevance score that considers term frequency, inverse document frequency, and proximity of search terms. APG vNext uses these relevance scores to order search results with the most relevant threads appearing first. To improve search relevance for your specific community's content, configure the APG vNext search weighting settings: the thread subject receives 3x more weight than post body text by default, reflecting that thread titles are a strong relevance signal. Increase this to 5x for knowledge base communities where thread titles are highly descriptive, or reduce it to 1x for conversational communities where the best answer may be buried in a long thread with an uninformative title.

Multi-Language Search Configuration

APG vNext full-text search supports multi-language content using SQL Server's language-aware word breakers and stemmers. Configure the language for the FTS index to match the primary language of your forum's content:

-- Check current FTS language:
SELECT language_id, name FROM sys.fulltext_languages
WHERE name IN ('English', 'French', 'Arabic', 'Spanish');

-- Recreate FTS index with correct language:
DROP FULLTEXT INDEX ON apg_Posts;
CREATE FULLTEXT INDEX ON apg_Posts
  (PostBody LANGUAGE 1033,   -- 1033=English
   PostSubject LANGUAGE 1033)
  KEY INDEX PK_apg_Posts ON apg_FTSCatalog;

For multilingual forums where posts exist in multiple languages, use the language-neutral word breaker (language 0) which applies basic whitespace tokenisation without language-specific stemming — less relevant for any single language but consistent across all languages in the index.

Monitoring Search Performance with SQL Server DMVs

SQL Server exposes full-text search performance data through dynamic management views (DMVs) that help diagnose slow search queries. Use these queries to identify search performance bottlenecks:

-- Check FTS index population status and item count:
SELECT name,
       FULLTEXTCATALOGPROPERTY(name,'ItemCount') AS ItemCount,
       FULLTEXTCATALOGPROPERTY(name,'PopulateStatus') AS PopStatus
FROM   sys.fulltext_catalogs;

-- Check FTS crawl error log:
SELECT document_id, crawl_time, error_message
FROM   sys.dm_fts_index_keywords(DB_ID(), OBJECT_ID('apg_Posts'))
WHERE  error_message IS NOT NULL;

Handling Stop Words in Full-Text Search

SQL Server FTS ignores common stop words (also called noise words) that appear too frequently to be useful search discriminators — words like the, a, is, and, and so on. When a member searches for a phrase that consists entirely of stop words (e.g., searching for a the), FTS returns zero results because all search terms are ignored. APG vNext handles this gracefully by detecting zero-result queries and falling back to a LIKE-based substring search when FTS returns nothing. You can also customise the SQL Server stop word list to add domain-specific common words that are too frequent in your community's content to be useful search terms — for a software forum, terms like function, method, or class may be so common that excluding them improves search result quality by forcing members to search for more specific terms.

Search Query Expansion

APG vNext can optionally expand search queries using SQL Server's semantic search features to include synonyms and related terms. For example, a search for error can automatically include exception, failure, and crash in the results. Enable semantic search expansion in Admin Panel → Search → Query Expansion. Semantic search requires the SQL Server Full-Text and Semantic Extractions for Search component to be installed — not all SQL Server editions include this by default. The feature is most valuable for technical support forums where members use different terms to describe the same problem.


Looking for more help? Browse the support forum or check the Knowledge Base.