Thread:Help talk:Selecting pages/Problem with selecting pages with long SMW Property Values and LIKE/reply

As a hack/workaround I made the following modifications:

in extensions/SemanticMediaWiki/src/SQLStore/QueryEngine/QueryEngine.php -> private function getInstanceQueryResult( Query $query, $rootid ):

added near the beginning:

In extensions/SemanticMediaWiki/src/SQLStore/QueryEngine/QuerySegmentListResolver.php -> public function resolveForSegment( QuerySegment &$query ) -> case QuerySegment::Q_DISJUNCTION:

added a similar check to the subquery where(s) before they are translated in SQL, after sql = ''; I added:

$wgCustomImSearch is a global variable that I adedd for now, defined in LocalSettings.php so that I can troubleshoot performance differences when this hack is active or not, but it can be avoided. So far I do not see any drawback for this hack and I have not found any other points in the code where it is needed. If you think this could be useful for the project, please let me know. If you know of any reason why this is a bad idea, once again, I'm all ears.