| WMDE-leszek created this task. WMDE-leszek added a project: Wikidata. Herald added a subscriber: Aklapper. |
It does not seem desired to have knowledge on CirrusSearch/Elastic encoded in Wikibase. It definitely is valuable to allow Elastic/Cirrus-powered search in Wikibase, but Wikibase itself should not be depending on CirrusSearch, or Elastic in any way. Similarly, CirrusSearch extension should not know that Wikibase even exists, as one of its possible users, but still both CirrusSearch and Wikibase would enable a powerful application.
Having such separation would allow more efficient development of both Wikibase, and CirrusSearch. Having clear boundaries would also improve the work on Cirrus-powered searched for Wikibase/Wikidata, as in my opinion, it would provide the area within which this work can be done, without a need to adjust Wikibase and/or CirrusSearch for the need of this specific topic (I mean that both CirrusSearch and Wikibase do far more than just Cirrus-based search in Wikibase).
I suggest the following way to make the separation: the CirrusSearch/Elastcic-specific code would be moved to a separate extension (also meaning it would be moved to its dedicated code repository). This extension would be enabled on wikis that use Wikibase, and the Cirrus-based search (e.g. wikidata.org). The extension would be owned by WMF's Search Platform team.
In practice, the separation would mean:
- moving code from the Wikibase\Repo\Search\Elastic namespace to the new extension
- also moving the code handling Cirrus-specific hooks out of Wikibase
- moving Cirrus-specific config files, and options out
- abstracting the way different search engines could be used by Wikibase search API (e.g. turn the useCirrus option into some more generic hook that extension could use to override the engine used in search)
- do not depend on/use FieldDefintions object in Wikibase's EntityHandlers etc. I have no immediate suggestion at hand yet, looking at this for brief two minutes I see several options to consider.
If looking at the code makes it easier for you to grasp the idea than reading prose, you might consider looking at https://gerrit.wikimedia.org/r/#/c/420037/ which is a very naive but fairly complete overview of what code in Wikibase would need to be moved or changed.
WMDE Engineering is fine with doing the separation work, but due to lack of Cirrus/Elastic-related expertise, we would prefer to not be responsible for the development and maintenance of the new extension, as argued above.
Thoughts @Smalyshev, @Lydia_Pintscher? Please feel free to add other people to the loop who you think would need to be part of this conversation.
Cc: thiemowmde, RazShuty, WMDE-leszek, Lydia_Pintscher, Aklapper, Smalyshev, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
