Try 30 days of free premium.

Autocomplete for Search (which you can install)


gazza911 wrote 8 years ago: 1

This usersript will add an autocomplete to TVMaze (searches for Shows/People as you type) and can also optionally be used as a search history.

Example Search Result (Image)

I contacted TVMaze about this, but after 3 weeks I still haven't received a reply so I'm not going to wait any more. The screenshot above just shows Show Search, but you can select to search for People instead. I've taken precautions so that this shouldn't cause issues for TVMaze's server (minimum 4 letters typed, only search after you stop typing for 0.5 seconds).

How to install

Firefox users: Download Greasemonkey

Chrome users: Download Tampermonkey

Go to the OpenUserJS script page

Click the blue 'Install' button on OpenUserJS and follow the on-screen instructions

All other tips/usage can be found on the OpenUserJS page


david wrote 8 years ago: 1

That's a pretty neat job, and a nice solution until we've implemented this ourselves :)

I'm not sure how/where you contacted us, but if you still have any questions please ask away.

FYI: The reason we haven't implemented something like this ourselves yet, is because the current search system isn't a great fit for autocomplete queries like this. If you type "Doctor Who" it'll obviously work great, but try searching for "Docto" and the results won't be as good. This is because the regular search function looks for your input anywhere in the show/person name instead of specifically at the beginning of the string.

We've had an autocomplete search functionality ready to go for over a year now, but unfortunately the underlying implementation in Elasticsearch has been broken all along. As soon as the fix lands (in ES 3.0 is the last I read) we'll support all this!


gazza911 wrote 8 years ago: 1

I contacted via email

If you wanted to return only shows that start with the input then you'd need to tell the index not to separate terms; see here:

https://www.elastic.co/blog/starts-with-phrase-mat...

Anyway, if you do improve the API / search functionality and decide to implement the autocomplete yourself, my script is Open source so you can use whatever parts of it you want.

vBm wrote 8 years ago: 1

Great job @gazza911 :)

Glad to see someone else is doing US' as well xD

Try 30 days of free premium.