You need to sign in or sign up before continuing.
General convergence in the searching space (needs:planning)
There are multiple frameworks dealing with the search space:
-
Contact Query BAO/Advanced Search/Search Builder- Note:
Profileis used as a storage model for the selection of fields fromContact BAO Query - Note:
Smart Groupsuse aContact Query BAOcriteria as a storage model for the search
- Note:
-
Custom Search- Note:
Custom Searchextends the frontend/controller system fromAdvanced Searchbut it completely replaces the underlying search-mechanism. This gives access to some functionality (likeSmart Groups) but not other (like customizing columns viaProfile).
- Note:
- Other
QuickForm/SelectorSearches (Find Activities;Find Contributions) -
Export- Note:
Import/Export Mappings are used as a storage model for the selection of fields fromExport. These are similar toProfile, except they include support for traversing relations.
- Note:
CiviReport-
APIv3/APIv4/API Explorer SQL Tasks
To some extent, there are distinctive features in each of these areas. However, I find it questionable that these distinctive features are enough to merit the separate subsystems. Example:
- The traditional
Exportsubsystem is built on theQuery BAOand other QuickFormSelectors. But it's not used for reports. - The report subsystem doesn't integrate the standard contact tasks. Arguably, this is because many reports deal with different record-types. However, one could reasonably expose search tasks in a reported -- provided you match on the type of the record in each row.
- One can figure out how to run a quirky search using either CiviReport or the API. But if one wants to use that same search to define a smart-group, it wouldn't work.
- If you're reading the
civicrm_saved_searchbehind aSmart Group, it's difficult to find documentation/explanations for the semantics of those fields. - There are code-generators for some things (like
APIentities andAPIactions andReports) but not others (likeSearch Tasks)
A couple example opinions:
- I like
APIvX.getas a layer for defining query-backend. The main gap in using it as the backend for all the above subsystems is the lack of aggregate/group functionality. - A search-task is basically an
APIvXaction plus (1) a bespoke form for tweaking the inputs of the action and (2) a declaration/registration of when to display the search-task.
It's not clear that a total convergence is sensible, and this one Gitlab issue shouldn't be responsible for every detail, but it makes sense to have some space to record general/broad discussion about the convergence of these subsystems.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information