Troubleshooting Common Search Issues

Even with well-structured content and thoughtfully designed search pages, things can go wrong. Content you expect to see in search results might be missing, or outdated content might appear when it shouldn't. Liferay provides both page-based and administrative tools for investigating how your site’s search is working. Being aware of available tools can help you diagnose issues and guide the troubleshooting process.

Liferay provides both page-based and administrative tools for investigating how your site’s search is working.

In this lesson, you’ll learn to diagnose and fix common search problems in Liferay. While some issues can be solved with tweaks to site configurations, other issues may require administrative access.

Understanding Search Behavior
Some apparent search issues aren’t bugs; they’re actually the search engine working as intended. If you consistently see unexpected results, consider exploring how search engines analyze, tokenize, and stem search terms and the index document content. Also, even if a behavior is technically correct, you can often use the tuning tools you've learned about to adjust the results to your liking.

Common Search Problems

Most search issues fall into a few common categories:

  • A newly published article doesn’t appear in search results.
  • An old or outdated document keeps appearing, even after being deleted or unindexed.
  • A search returns no results, even though you’re sure relevant content exists.
  • A result is missing key metadata (e.g., its categories or summary).
  • A specific search term or phrase is behaving inconsistently.
  • Search phrases are behaving unexpectedly.

Problems like these are often caused by simple content configurations, indexing issues, or incorrect scope. Hence, troubleshooting often requires tuning how the search engine processes your content.

Troubleshooting Basics

Before using administrative tools, start by checking the most common sources of search problems. Most issues can be resolved by reviewing the configuration of the content itself, the settings on the search page, or by performing a reindex.

Content Troubleshooting

As discussed earlier, the most common cause of search problems is a misconfiguration on the content item itself. When a specific asset is missing, check these configurations:

  • Is the asset searchable? When editing web content, documents, or blog posts, ensure the Searchable option is checked. If it’s disabled, Liferay won’t include the content in the search index.
  • Is the asset approved and published? Drafts and pending content won’t appear in results.
  • Is the asset stored at the correct scope? If you’re on a site-scoped search page, content from other sites won’t appear, even if it’s published and indexed.
  • Are the permissions correct? Users can only see assets they're authorized to access. If a search works for you but not for other users, check the permissions for the asset and its place in your content hierarchy (e.g., folders, collections).

Search Page Troubleshooting

If the content itself is configured correctly, the issue may be on the search page. Consider these factors:

  • Is the Search Bar working at the right scope?

    By default the search bar is configured to search content in the current site. You won’t see global content like products, company-scoped objects, or content from another site in your search results. You must choose the everything scope in the search bar for these to appear in your search results.

  • Is the Type Facet configured to show the content type you’re missing?

    Most facets affect the filtering options users have access to, but the Type Facet has an additional role: content types are excluded from the search results entirely if they’re removed from the Type Facet widget’s current content selector. If none of your blogs entries are appearing in the search results, you can quickly check the Type Facet configuration to see if that’s the culprit.

Reindexing Search Data

If recent content isn’t showing up or old content still appears after being deleted, the search index may be out of sync. A reindex clears out stale data and rebuilds the index from scratch. Though it can be time-consuming for larger sites, it’s a surprisingly effective fix for search oddities. Think of it like restarting your router—it’s not a solution for every problem, but it often resolves quirks without a deep investigation.

NOTE
Some reindex modes and actions can be resource-intensive and cause temporary search downtime, disrupting the user experience. If possible, try to reindex when site traffic is at its lowest.

Administrative Troubleshooting Tools

Once you’ve ruled out basic configuration options, you can leverage Liferay’s built-in diagnostic tools. With them, you can look more deeply into the search infrastructure to identify where the problem might lie. These tools typically require administrative access. This section provides a high-level overview of their capabilities, so you can collaborate effectively with your administrative team and make informed requests when troubleshooting complex issues.

Troubleshooting Tool Description Requirements
Elasticsearch Monitoring Widget Provides real-time metrics from your Elasticsearch cluster. This can help identify stuck indexing tasks or performance issues, which can lead to outdated or inconsistent search results. Only for Self Hosted and PaaS deployments, since it requires system level configurations and installing Kibana, the third party search monitoring tool from Elastic.
Search Insights Widget Shows the exact query sent to Elasticsearch and the detailed response it returned. You can use this information to see precisely why a result was or was not included or ranked highly. Requires the administrator role.
Display Results in Document Form A Search Results widget setting that displays all the raw, indexed data fields for a given result. This is especially useful for diagnosing content metadata issues. Requires the administrator role.
Field Mappings UI An administrative UI that displays field mappings for each search index. Requires control panel access.
Reindex Actions Triggers a rebuild of search indexes based on the content stored in the database. This can help clear out stale data and resolve inconsistencies. You can perform a full reindex of all data or a more targeted reindex on a specific search index. Requires control panel access.

 

Conclusion

Troubleshooting search issues doesn’t have to be frustrating or mysterious. By checking content and search page configurations, you can diagnose and solve many common search issues. For more complex issues, you can use Liferay’s admin tools to diagnose and fix issues.

Next, you’ll practice troubleshooting search issues for Clarity Vision Solutions.

loading-knowledge-label