Follow

How does search work in Rivista

This page should help explain how Rivista search works.

Not Google

Rivista search is not Google. You can't type in a phrase like "how to upload files to the internet" and find an article with that exact match. This is perhaps the most important thing to remember - not Google.

How It Works

Rivista site search uses Full Text Search (FTS) with tsearch2 (see Further Reading). Put simply, when a piece of content is saved the content is parsed into words and those words are stored with the content. This set of words is then the source for search queries. On the other side, search terms submitted for search are also parsed into words with punctuation, single character entities and stop words discarded (stop words include words such as 'the' and 'at'). This is of particular relevance when trying to search for something like "AT&T" which will be reduced to AT & T and all of it discarded (AT is a stop word, & is a special case meaning "and" and T is a single character word).

For another example, a search term entered as "Fox & Hound" (perhaps as a company name in a restaurant review article) will never be searched upon as a whole phrase. The phrase will be broken down into the two words "Fox" and "Hound" with the ampersand ignored. The results returned will be for items containing both words. The search term is parsed to remove everything not a-z 0-9 ( ) " + - and the keywords that are generated do not include these characters either. For instance, the word "baker's" as a keyword is "baker" and searching for "baker's" will return results for "baker". Including multiple words in a search will return results with all of those words found.

Potential

It is possible to change how content is parsed and what search terms are allowed. Further Reading contains a link to an article on how to write a custom parser with an example that allows apostrophes in the keywords.

Further Reading

Have more questions? Submit a request

Comments

Powered by Zendesk