Support Local Sites in search.

Review Request #7062 — Created March 14, 2015 and submitted — Latest diff uploaded

Information

Review Board
release-2.0.x
cc05769...

Reviewers

Review requests and users on Local Sites are now indexed. When
searching, the Local Site (or lack thereof) is taken into account, and
only the appropriate results will be returned.

There's a BaseSearchIndex that all other search indexes must subclass.
This takes care of storing information on the associated local site(s)
in a consistent manner, to ease search queries. If no local sites are
associated with the object being indexed, the list will consist of a
single item: 0. This value indicates no local sites, and is easy to
query. This replaces the need for a separate boolean field. Empty lists
cannot be used, since there's no way to filter on these in any
consistent way across search backends.

As part of this, I had to remove usage of Haystack's
search_view_factory, which doesn't accept URL arguments. We now have our
own wrapper view that constructs the RBSearchView.

This requires a full re-index.

On a non-local site, I tried searching for both non-local site review requests
and local site review requests. Only the ones not on a local site were returned.

I repeated the same test when searching on a local site. Only the ones on that
local site were returned.

    Loading...