Searching

These FAQs briefly summarise key points regarding Composr's full-text search feature.

For more information, check out these tutorials:
Question How do I search my Composr website?
Answer There are a few ways to search your Composr website:
  • Using the search bar in the header: This is the simplest way to search. Just type your search term in the box and click the search button.
  • Using the 'Search' module: This module offers more detailed search options. You can access it via the 'site:search' page-link (usually under About > Search in the default menu).
  • From the Forum: Click the 'Search' button on the forum or use the contextual search box on the forum member bar. This will search within your current forum or topic.
Question What is the difference between natural and boolean searching?
Answer Natural search is a more relaxed approach where you type in your search terms and Composr tries to find the most relevant results, even if they don't contain all the words. It's like a Google search.

Boolean search requires more precision and uses operators like "+", "-", and quotation marks to define exactly what you're looking for. For example, searching for "+car -maintenance" will only return results that contain the word "car" but not "maintenance".
Question Can I filter my search results?
Answer Yes, you can filter your search results by:
  • Content type: Choose to search specific content types like news, forum posts, or Comcode pages.
  • Author/Submitter: Search for content submitted by a specific member.
  • Date: Limit your search to content submitted within a specific time frame.
  • Category (for certain content types): Narrow down your search to specific categories within a content type.
Question What is the fast custom index and why should I use it?
Answer The fast custom index is Composr's own search engine, designed to be faster and more efficient than MySQL full-text search, especially for large websites and filtered searches.

Benefits of the fast custom index:
  • Faster filtered searches: Significantly improves search speed when you add filters like category or author.
  • Configurable stop words: Control which common words are ignored during search.
  • Better stemming: More accurately recognizes variations of words (e.g., "like" and "liking").
  • Multilingual support: Indexes content based on different language translations.

Downsides of the fast custom index:
  • Slight lag in indexing new content: New content takes a short time to be indexed.
  • Less accurate ranking: Ranking is based on the most obscure keyword, not a blend of all keywords.
  • Cannot perform blank searches: You must enter at least one keyword.
Question How can I improve my search results?
Answer Here are some tips for improving search results:
  • Use specific keywords: The more specific your keywords, the better your results.
  • Use boolean operators: Use "+", "-", and quotation marks to refine your search.
  • Optimize content titles and meta keywords: These fields are given priority during search, so make sure they accurately reflect your content.
  • Consider enabling the fast custom index: Especially beneficial for large websites or frequent filtered searches.
Question How do stop words affect search results?
Answer Stop words are common words (like "the", "a", "is") that are ignored by the search engine because they add noise and don't contribute to the meaning of the search query. You can customize the list of stop words for the fast custom index. See the search tutorial for more information.
Question What are quoted phrases and how do they work?
Answer Quoted phrases allow you to search for an exact sequence of words. For example, searching for "red apple" will only return results containing that exact phrase. Keep in mind that enabling quoted phrases can increase disk space usage.
Question How does the search engine handle different languages?
Answer Composr's fast custom index supports multiple languages. Content is indexed based on its translated version, ensuring that you get relevant results even when searching in a different language.
Question Why are my searches slow, and how can I improve search speed?
Answer Slow searches can occur when dealing with large amounts of content. Here are some workarounds and solutions:
  • MySQL timeout setting: For MySQL 5.7+, set a query timeout to prevent searches from locking up your database. Composr automatically sets this, but you can configure it manually if needed.
  • Use InnoDB tables: Switching to InnoDB tables in MySQL can prevent slow queries from affecting other users on your website. Note that InnoDB is not officially supported by Composr yet.
  • Enable the fast custom index: As mentioned earlier, the fast custom index is optimized for handling large datasets and filtered searches, potentially leading to significant speed improvements.