Joining buckets on keys

So I am trying to find out how determine what key following join will be on
Is it on the Doc.Always or we can join based on other values as well
select t1.id from
(
select t0.id from
(select meta().id as id from travel-sample where type = ‘route’ order by to_number(meta().id) ) t0
offset 20 limit 10
) t1
INNER JOIN travel-sample t2 on keys t1.id

it can be other values , in fact

which means each qualified document from the left hand side (LHS) of the JOIN operator is required to produce primary keys of documents on the right hand side (RHS). such as

INNER JOIN travel-sample t2 on keys (t1.id == META(t2).id)

so t1.id can be any other keys that is foreign key.