search mobile facets autocomplete spellcheck crawler rankings weights synonyms analytics engage api customize documentation install setup technology content domains user history info home business cart chart contact email activate analyticsalt analytics autocomplete cart contact content crawling custom documentation domains email engage faceted history info install mobile person querybuilder search setup spellcheck synonyms weights engage_search_term engage_related_content engage_next_results engage_personalized_results engage_recent_results success add arrow-down arrow-left arrow-right arrow-up caret-down caret-left caret-right caret-up check close content conversions-small conversions details edit grid help small-info error live magento minus move photo pin plus preview refresh search settings small-home stat subtract text trash unpin wordpress x alert case_deflection advanced-permissions keyword-detection predictive-ai sso
Search Concepts / TF-IDF Search Relevance Model

What is TF-IDF Search Relevance Model?

TF-IDF (term frequency weighted by inverse document frequency) is a relevance model that determines how relevant a particular document is for a given query by weighting the number of times that query appears within the searchable text corpus (TF) by the number of times that query appears within the specific document (IDF). TF-IDF serves as the foundation for determining relevance in many open source search engine software packages. The reason this model is so prevalent is because it assigns a relevance score for each document that results can then be sorted upon, as opposed to a simple yes/no relevance model which merely determines if a document is relevant or not for that query and returns disorganized results with no relevance score.

In Swiftype

Swiftype search engines use TF-IDF as a starting point for determining relevance, but are also built to learn from user clickthrough behavior. Furthermore, within Site Search, site owners can use the Weights tab in their Swiftype dashboard to precisely control how certain elements of their website schema impact search results. Within App Search, weights and boosts can be applied programmatically via a suite of robust APIs.

Swiftype is the easiest way to add great search to your website