diff --git a/app/Http/Controllers/Api/V1/ItemController.php b/app/Http/Controllers/Api/V1/ItemController.php index c99fbba42..c264fc52d 100644 --- a/app/Http/Controllers/Api/V1/ItemController.php +++ b/app/Http/Controllers/Api/V1/ItemController.php @@ -40,6 +40,7 @@ class ItemController extends Controller 'exhibition', 'box', 'location', + 'location.tree', ]; private $rangeables = ['date_earliest', 'date_latest', 'additionals.order']; diff --git a/config/elasticsearch/mapping/items.php b/config/elasticsearch/mapping/items.php index 57c0cb447..62a02f122 100644 --- a/config/elasticsearch/mapping/items.php +++ b/config/elasticsearch/mapping/items.php @@ -192,6 +192,12 @@ ], 'location' => [ 'type' => 'keyword', + 'fields' => [ + 'tree' => [ + 'type' => 'text', + 'analyzer' => 'tree_analyzer', + ], + ], ], 'frontend' => [ 'type' => 'keyword',