Rethinking and reworking the search
Posted by mholmes on 06 Feb 2017 in Activity log
Spent a lot of time working on the search today, and ended up making it much simpler:
- We don't need an AJAX option; just appending #search_results to the form/@action param gives you the effect you want when moving between pages. All AJAX stuff now removed.
- We don't need a "search for" option; it's better to have a more refined "search in" dropdown, allowing you to search the personography or the bibliography etc.
- We have some remaining problems with what to actually search. We will need to make a distinction between document content and the peripheral lists of other related documents. At the moment, this distinction is not adequately made across the different document types. There needs to be a single div which is isolated from the peripheral stuff which contains the content which is at the heart of the document, and unique to it, and that's what needs to be searched. That'll take a reworking of the static site output.
- I've added a tiny site option for MoEML, because it was taking ridiculous amounts of time to build and deploy the full app. It's very crude at the moment, but I should be able to refine it over time so it covers most of what we need.
- There's some anomalous behaviour with the exist indexing of meta elements in the header; the search should pull back only (for instance) tags with @name="dcterms.title", but it seems to be retrieving others nearby. That could be caused by corrupted indexes due to an incomplete uninstall of the webapp.