Search now working
The search from the textbox is basically working now, combining hits found through searching the names file then looking for documents linking to the hits found there with a text search of the <decoDesc> and <provenance> elements in the <teiHeader>s of the actual documents. This involved substantial index configuration, but it seems to be pretty quick. One issue is that hits are not highlighted in the individual documents when they're retrieved; this might be achieved by passing the search string back to the AJAX call which pulls up a document, and then using ft:query to retrieve the document. That should result in exist:match elements for the hits, which we can process into highlighted spans.
Also met with PAB and we worked through a set of fixes and changes, mainly relating to items not showing up on the menus (usually because key markup was missing), and items not completely showing (because I wasn't processing child elements of keywords, just the first-level text children, now fixed).