This <a href="https://framagit.org/framasoft/peertube/search-index" target="_blank">index engine code</a> is under FLOSS license so that anyone can host their own index engine and set their own eligibility rules. As an example, if you want to set up a search interface that only allows you to search for videos hosted on instances dedicated to video games, you will just have to create a list including all instances URLs you have selected and put it online. So that the index engine can refer to it and return you the appropriate results.