Try 30 days of free premium.

US and UK versions, Improve Search Formula to Factor In Release Country

hooplah wrote 2 days ago: 1

https://api.tvmaze.com/singlesearch/shows?q=the+office

https://api.tvmaze.com/singlesearch/shows?q=the+office+us

https://api.tvmaze.com/singlesearch/shows?q=the+office+uk

The above all return The Office [US] [tvmaze:526].

If you want to be sure you're matching with the proper show, use the search endpoint instead.

Having read that, I get that disambiguation is a nightmare. However, the fact that "the office uk" directs to the US version is problematic, if it gave no result I would understand.

If the search weighting formula was able to look for "US" or "UK" [or maybe even "AU" and other countries] in query and then boost results that match that country code. If it could also place less priority on US/UK/AU being present in the official main title, that would help. This would help save the latency of having to do a search and then a second request with exact tvmaze-id.

...

Otherwise if that is too expensive for the search algorithm or is undesirable. It would be great if "US" and "UK" title versions could be added to the AKAs where it makes sense (usually for shows with the same name). If some shows are missing the new AKAs, no worries so long as most had the extra disambiguation information. This avoids burden of any large or complicated changes to search algorithm.

That would then leave the fuzzy algorithm combined with AKA logic (which already both exist). Ideally an exact match against an AKA would rate higher in most cases than a partial match against the main title.

The Office [US] [tvmaze:526] [desired AKA]

- The Office

- The Office US

- The Office 2005 (this would be extremely easy for TVMaze to automatically implement for every tv show and automatically update if release year was changed).

The Office [UK] [tvmaze:1292] [desired AKA]

- The Office

- The Office UK

- The Office 2001

 

TLDR: "The Office" is just an example. What I am requesting...

...

- Treat "UK" and "US" as optional terms in search query, and have search algorithm incorporate release country into weighting formula.

- Related, a year in title should be treated as optional and search algorithm should factor in release year into weighting formula. "The Office 2005" would not return null.

or

- As many shows as possible to have their AKAs updated, best done by a bot or internally by TVMaze.

- Minor change in search matching code if necessary to help boost the exact match against AKA so it is the first result in most cases.

or

- Alternately, fix search matching code so that "the office uk" and "the office us" do not direct to The Office.


tnt wrote 2 days ago: 1

Per TVmaze policy, The name must be the original name given by the network or web channel. There must be no suffixes like "(UK)" or "(2013)" that are not part of the original show name.

I suppose at this point the best you could do is to use the search endpoint and parse the results on your end.


david wrote 2 days ago: 1

I'm not opposed to enhancing the search system to recognize country or year suffixes in the search query, although that's more complicated than you might think so it won't be possible before a large refactor of the search system.

If your search returns multiple matches, we currently recommend that you use the results' metadata like country & year to differentiate between them yourself. See f.e. https://www.tvmaze.com/threads/314/shows-using-same-name#6417

Try 30 days of free premium.