Wow, ok so I spent all day on this, I seem to have gotten it to work, but to be honest, I'm not 100% sure why/how this works. Anyways, I altered the code in the answer given here: Searching a specific section by four different types of parameters?
And ended with this:
{% set zoekschip = craft.request.getParam('zoekschip') %}
{% set params = {
section: 'tours',
limit: null
} %}
{% set relatedParams = ['and'] %}
{# plaats #}
{% if craft.request.getParam('zoekplaats') %}
{% set plaats = craft.request.getParam('zoekplaats') %}
{% set params = params|merge({'startloc':plaats}) %}
{% endif %}
{# Schip #}
{% if craft.request.getParam('zoekschip') %}
{% set zoekschip = craft.entries.section('ships').shipName(craft.request.getParam('shipName')).first %}
{% set relatedParams = relatedParams|merge([{ targetElement:zoekschip }]) %}
{% endif %}
{# add relatedParams to params #}
{% if relatedParams|length > 1 %}
{% set params = params|merge({'relatedTo':relatedParams}) %}
{% endif %}
{# perform search #}
{% set searchParams = craft.request.getParam('q') %}
{% set entries = craft.entries(params).search(searchParams|trim) %}
{% for entry in entries %}
..output..
{% endfor %}
Now, this works, it's pretty awesome, and after examining I understand it, and have a better understanding of how the
relatedTo: {targetElement: }
works :)
My next challenge, is to add another search param, regarding the dates.
The tours section currently has a matrix field which has one block, called 'vertrekdatum'. (departuredate) How I add the date to the param, and check whether any tour has that date in their blocks, and output if so..?
Thanks heaps in advanced!