Skip to content

Commit be88887

Browse files
committed
Hack for new Solr release
Signed-off-by: Stefan Weil <sw@weilnetz.de>
1 parent a9f08f1 commit be88887

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

module/VuFindSearch/src/VuFindSearch/Backend/Solr/Connector.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,10 @@ public function retrieve($id, ?ParamBag $params = null)
222222
*/
223223
public function similar($id, ParamBag $params)
224224
{
225-
$handler = $this->map->getHandler(__FUNCTION__);
226225
$this->map->prepare(__FUNCTION__, $params);
227226

228227
try {
229-
return $this->query($handler, $params, true);
228+
return $this->query('morelikethis', $params, true);
230229
} catch (RequestErrorException $e) {
231230
// If Solr was unable to fetch the record, just act like we have no similar records:
232231
if (str_contains($e->getMessage(), 'Could not fetch document with id')) {

module/VuFindSearch/src/VuFindSearch/Backend/Solr/SimilarBuilder.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ public function build($id)
131131
'q',
132132
sprintf('%s:"%s"', $this->uniqueKey, addcslashes($id, '"'))
133133
);
134-
$params->set('defType', 'morelikethis');
135134
}
136135
if (null === $params->get('rows')) {
137136
$params->set('rows', $this->count);

0 commit comments

Comments
 (0)