diff --git a/config/dispatcher/dispatcher.ex b/config/dispatcher/dispatcher.ex index 71e6750..9854ec6 100644 --- a/config/dispatcher/dispatcher.ex +++ b/config/dispatcher/dispatcher.ex @@ -221,7 +221,7 @@ defmodule Dispatcher do match "/sessions/*path", %{ accept: [:any], layer: :api} do Proxy.forward conn, path, "http://login/sessions/" end - + ############################################################### # SEARCH ############################################################### @@ -239,10 +239,6 @@ defmodule Dispatcher do forward conn, path, "http://kalliope-api/v3/api-docs/" end - match "/changes/*path", %{ layer: :api_services, accept: %{ json: true } } do - forward conn, path, "http://kalliope-api/changes/" - end - match "/consolidated/*path", %{ layer: :api_services, accept: %{ json: true } } do forward conn, path, "http://kalliope-api/consolidated/" end diff --git a/config/search/config.json b/config/search/config.json index 7122002..f3d5ae4 100644 --- a/config/search/config.json +++ b/config/search/config.json @@ -9,12 +9,13 @@ ], "types": [ { - "type": "person", - "on_path": "people", + "type": "mandatory", + "on_path": "mandatories", "rdf_type": "http://data.lblod.info/vocabularies/erediensten/EredienstMandataris", "properties": { "given_name": ["http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan","http://xmlns.com/foaf/0.1/givenName"], "id": ["http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan","http://mu.semte.ch/vocabularies/core/uuid"], + "uuid": ["http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan","http://mu.semte.ch/vocabularies/core/uuid"], "family_name": ["http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan","http://xmlns.com/foaf/0.1/familyName"], "first_name_used": ["http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan","https://data.vlaanderen.be/ns/persoon#gebruikteVoornaam"], "end_date": "http://data.vlaanderen.be/ns/mandaat#einde", @@ -59,8 +60,7 @@ "http://www.w3.org/ns/org#holds", "http://www.w3.org/ns/org#role", "http://www.w3.org/2004/02/skos/core#prefLabel" - ], - "planned_end_date": "https://data.lblod.info/vocabularies/erediensten/geplandeEinddatumAanstelling" + ] }, "mappings": { @@ -123,11 +123,269 @@ } } }, - "end_date": { "type": "date" }, - "planned_end_date": { "type": "date" } + "end_date": { "type": "date" } } } }, + { + "type": "minister", + "on_path": "ministers", + "rdf_type": "http://data.lblod.info/vocabularies/erediensten/RolBedienaar", + "sub_types": ["http://data.lblod.info/vocabularies/contacthub/AgentInPositie"], + "properties": { + "given_name": ["http://www.w3.org/ns/org#heldBy","http://xmlns.com/foaf/0.1/givenName"], + "id": ["http://www.w3.org/ns/org#heldBy","http://mu.semte.ch/vocabularies/core/uuid"], + "uuid": ["http://www.w3.org/ns/org#heldBy","http://mu.semte.ch/vocabularies/core/uuid"], + "family_name": ["http://www.w3.org/ns/org#heldBy","http://xmlns.com/foaf/0.1/familyName"], + "first_name_used": ["http://www.w3.org/ns/org#heldBy","https://data.vlaanderen.be/ns/persoon#gebruikteVoornaam"], + "end_date": "http://data.lblod.info/vocabularies/contacthub/eindedatum", + "organization_id": [ + "http://www.w3.org/ns/org#holds", + "^http://data.lblod.info/vocabularies/erediensten/wordtBediendDoor", + "http://mu.semte.ch/vocabularies/core/uuid" + ], + "organization_name": [ + "http://www.w3.org/ns/org#holds", + "^http://data.lblod.info/vocabularies/erediensten/wordtBediendDoor", + "http://www.w3.org/2004/02/skos/core#prefLabel" + ], + "organization_municipality": [ + "http://www.w3.org/ns/org#holds", + "^http://data.lblod.info/vocabularies/erediensten/wordtBediendDoor", + "http://www.w3.org/ns/org#hasPrimarySite", + "https://data.vlaanderen.be/ns/organisatie#bestaatUit", + "https://data.vlaanderen.be/ns/adres#gemeentenaam" + ], + "organization_province": [ + "http://www.w3.org/ns/org#holds", + "^http://data.lblod.info/vocabularies/erediensten/wordtBediendDoor", + "http://www.w3.org/ns/org#hasPrimarySite", + "https://data.vlaanderen.be/ns/organisatie#bestaatUit", + "http://www.w3.org/ns/locn#adminUnitL2" + ], + "position_id": [ + "http://www.w3.org/ns/org#holds", + "http://data.lblod.info/vocabularies/erediensten/functie", + "http://mu.semte.ch/vocabularies/core/uuid" + ], + "position_name": [ + "http://www.w3.org/ns/org#holds", + "http://data.lblod.info/vocabularies/erediensten/functie", + "http://www.w3.org/2004/02/skos/core#prefLabel" + ] + }, + + "mappings": { + "properties": { + "family_name": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "id": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "given_name": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "organization_id": { "type": "text" }, + "organization_province": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "organization_name": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "organization_municipality": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "position_id": { "type": "text" }, + "position_name": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "end_date": { "type": "date" } + } + } + }, + { + "type" : "person", + "composite_types" : ["minister", "mandatory"], + "on_path" : "people", + "properties" : [ + { + "name" : "given_name", + "mappings" : { + "minister" : "given_name", + "mandatory" : "given_name" + } + }, + { + "name" : "id", + "mappings" : { + "minister" : "id", + "mandatory" : "id" + } + }, + { + "name" : "family_name", + "mappings" : { + "minister" : "family_name", + "mandatory" : "family_name" + } + }, + { + "name" : "first_name_used", + "mappings" : { + "minister" : "first_name_used", + "mandatory" : "first_name_used" + } + }, + { + "name" : "end_date", + "mappings" : { + "minister" : "end_date", + "mandatory" : "end_date" + } + }, + { + "name" : "organization_id", + "mappings" : { + "minister" : "organization_id", + "mandatory" : "organization_id" + } + }, + { + "name" : "organization_name", + "mappings" : { + "minister" : "organization_name", + "mandatory" : "organization_name" + } + }, + { + "name" : "organization_municipality", + "mappings" : { + "minister" : "organization_municipality", + "mandatory" : "organization_municipality" + } + }, + { + "name" : "organization_province", + "mappings" : { + "minister" : "organization_province", + "mandatory" : "organization_province" + } + }, + { + "name" : "position_id", + "mappings" : { + "minister" : "position_id", + "mandatory" : "position_id" + } + }, + { + "name" : "position_name", + "mappings" : { + "minister" : "position_name", + "mandatory" : "position_name" + } + } + ], + "mappings": { + "properties": { + "family_name": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "id": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "given_name": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "organization_id": { "type": "text" }, + "organization_province": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "organization_name": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "organization_municipality": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "position_id": { "type": "text" }, + "position_name": { + "type": "text", + "fields": { + "field": { + "type": "keyword" + } + } + }, + "end_date": { "type": "date" } + } + } + }, { "type": "unit", "on_path": "units", diff --git a/config/search/update-handler.store b/config/search/update-handler.store new file mode 100644 index 0000000..90757d3 --- /dev/null +++ b/config/search/update-handler.store @@ -0,0 +1,3 @@ +--- +queue: [] +index: {} diff --git a/docker-compose.yml b/docker-compose.yml index 22dfa45..4fd0244 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -79,7 +79,7 @@ services: restart: always logging: *default-logging kalliope-api: - image: lblod/jsonld-delta-service:0.5.4 + image: lblod/jsonld-delta-service:0.5.5 volumes: - ./config/kalliope:/config - ./data/files:/share @@ -90,6 +90,7 @@ services: LOGGING_LEVEL: "INFO" SPARQL_ENDPOINT: "http://db:8890/sparql" LIMIT_SIZE: "10000" + MU_AUTH_SUDO: "false" labels: - "logging=true" restart: always @@ -338,7 +339,7 @@ services: # MU SEARCH - TODO USE THE CORRECT IMAGE ONCE INHERITANCE IS IN MU SEARCH ################################################################################ search: - image: nbittich/mu-search:wip # Bump to fixed version when merged and release to the original repo + image: nbittich/mu-search:wip-inheritance # Bump to fixed version when merged and release to the original repo links: - db:database restart: always @@ -351,4 +352,3 @@ services: environment: - discovery.type=single-node restart: always - \ No newline at end of file