Skip to content

Commit

Permalink
search by id and identifier in API v1
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-kamil committed Nov 28, 2024
1 parent 70d11b2 commit d1bb0e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/Http/Controllers/Api/V1/ItemController.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ class ItemController extends Controller
'box',
'location',
'location.tree',
'identifier',
'id',
];

private $rangeables = ['date_earliest', 'date_latest', 'additionals.order'];
Expand Down Expand Up @@ -303,7 +305,7 @@ protected function createQueryBuilder($q, $filter)

if ($q) {
$query = Query::multiMatch()
->fields(['title.*', 'description.*'])
->fields(['title.*', 'description.*', 'identifier', 'id'])
->query($q);
$builder->must($query);
}
Expand Down

0 comments on commit d1bb0e2

Please sign in to comment.