Trying to abstract the combined keyword/text search into a separate library yesterday was very problematic, but I took a simpler approach this morning and simply copied and adapted the code from search.xq into advanced_search.xq. The result seems to be working perfectly -- the keyword/text search is done first to retrieve a set of @xml:ids, then the search is done on those ids, with additional filters provided by the other form controls.
PAB wants to combine the simple search (which is actually very complicated behind the scenes, since it does keyword lookups and combines them with supplementary text-searching) with the advanced search filters. This is proving virtually impossible, partly because it's just too messy -- you'd need to retrieve a document set from the keyword search in a separate step, and then filter it -- and partly because I just don't have time to implement it properly before the launch. I'll have a couple more shots at it, but things aren't looking good so far.
Made a few other changes and fixes requested with PAB, and hid the text search box, since it's doing what it says on the box (a text search), and not what PAB wants (a complicated keyword search).
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.
|<< <||Current||> >>|