build the search query field-by-field, so that it's correct
don't mix simple and advanced search for "all" field queries; so advanced search now has search__all; this means we can apply stricter match requirements
adjust field chooser so that the user can't choose no fields, or all + other fields
advanced search on the "content" field must search content, pages and provisions
There is still a problem with negative queries on pages or legislation with provisions. Because each provision/page is indexed and search individually, it's possible to have a search dog -cat that returns a document with cat in it, because it'll match pages or provisions that have dog but not cat.
So for negative searches we actually need to index and search the full content, not on a per-page or per-provision basis.
search__all
; this means we can apply stricter match requirementsCloses #1795
https://www.loom.com/share/e0e891516fdd488cab852e9ca663c387
There is still a problem with negative queries on pages or legislation with provisions. Because each provision/page is indexed and search individually, it's possible to have a search
dog -cat
that returns a document withcat
in it, because it'll match pages or provisions that havedog
but notcat
.So for negative searches we actually need to index and search the full content, not on a per-page or per-provision basis.