I've implemented the advanced search as a separate page, and got it basically working, although some missing bits in the encoding mean that it's not finding everything it should (e.g. dates are missing @whens sometimes).
Met with PAB and made a number of fixes:
We also made a plan for an advanced search, which I'll document in more detail here before I try to implement it.