How is the best OA location determined?

When an article has more than one OA location, we need to decide which is the most current, authoritative version, which is first in oa_locations and is called the best_oa_location_._

Each location is assigned a sort score based on:

  1. host_type: “publisher” is better than “repository”.
  2. version: “publishedVersion” is better than “acceptedVersion”, which is better than “submittedVersion”.
  3. url_for_pdf: A location with a direct PDF link is better than one without.
  4. for repository locations, evidence: A repository record matched by DOI is better than one matched by title.
  5. repository rankings: Some major repositories like PubMed Central and arXiv are ranked above others.

These attributes are compared and treated as a series of tiebreakers, producing an ordered list of locations.