Search result troubleshooting
My site search isn’t returning the correct results.
Some common issues with searching:
If your search results page is completely blank (a zero byte page), the problem is probably a fatal error that is not displayed because of your Production Status setting. See this FAQ for more information.
Page layout is displayed, but no articles
If your search results page shows its normal page layout, but with no articles, you should check three things:
1. That the sections containing the articles in question have Include in site search set to Yes on textpattern > presentation > sections.
2. That the search term you’re using really does match some articles. Test the same search term in the Search Body & Title box on textpattern > content > articles, and make sure that finds at least one Live article. If not, use a single, common word, and try varying the case. Case sensitive search results are caused by an incorrect collation setting on your textpattern database or table.
3. If you’re using a special section such as
/search/ to display your search results, make sure your
<txp:article /> tag doesn’t
searchall=0 – this will force it to look for articles in the
searchall=1 is the default; this tells the article tag to display results from all sections that have Include in site search set to Yes.
Wrong articles are displayed
If your search results page displays the wrong articles – the same articles as your front page, for example – it’s probably because you’re using the
<txp:article_custom /> tag instead of
<txp:article />. article_custom is context insensitive – that is, it always displays the same list of articles, regardless of the URL or query parameters.
Either change your page template to use
<txp:article /> instead, or use a separate section and template to display the search results.