From db7ffa81fbf0d0f2a53618a06d8ae2b6591bdf21 Mon Sep 17 00:00:00 2001
From: Celia Michotey <celia.michotey@inra.fr>
Date: Fri, 4 Oct 2019 17:59:49 +0200
Subject: [PATCH 01/11] Create script to index data in FAIDARE. Update program
 mapping file.

---
 .../es/setup/index/program_mapping.json       |  94 +++++---
 scripts/harvest.sh                            | 221 ++++++++++++++++++
 2 files changed, 283 insertions(+), 32 deletions(-)
 create mode 100755 scripts/harvest.sh

diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/program_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/program_mapping.json
index b556355a..aef2ae37 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/program_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/program_mapping.json
@@ -1,34 +1,64 @@
 {
-  "program": {
-    "dynamic": false,
-    "properties": {
-      "programDbId": {
-        "type": "keyword"
-      },
-      "programName": {
-        "type": "keyword"
-      },
-      "abbreviation": {
-        "type": "keyword"
-      },
-      "groupId": {
-        "type": "long"
-      },
-      "leadPerson": {
-        "type": "keyword"
-      },
-      "objective": {
-        "type": "keyword"
-      },
-      "source": {
-        "type": "keyword"
-      },
-      "speciesGroup": {
-        "type": "integer"
-      },
-      "documentationURL": {
-        "type": "keyword"
-      }
-    }
-  }
+	"program": {
+	"dynamic": "strict",
+		"properties": {
+			"programDbId": {
+				"type": "keyword"
+			},
+			"name": {
+				"type": "keyword"
+			},
+			"programName": {
+				"type": "keyword"
+			},
+			"abbreviation": {
+				"type": "keyword"
+			},
+			"objective": {
+				"type": "keyword"
+			},
+			"leadPerson": {
+				"type": "keyword"
+			},
+			"source": {
+				"type": "keyword"
+			},
+			"studyDbIds": {
+				"type": "keyword"
+			},
+			"trialDbIds": {
+				"type": "keyword"
+			},
+			"documentationURL": {
+				"type": "keyword"
+			},
+			"programURI": {
+				"type": "keyword"
+			},
+			"studyURIs": {
+				"type": "keyword"
+			},
+			"trialURIs": {
+				"type": "keyword"
+			},
+			"groupId": {
+				"type": "long"
+			},
+			"@type": {
+				"type": "keyword"
+			},
+			"@id": {
+				"type": "keyword"
+			},
+			"schema:includedInDataCatalog": {
+				"type": "keyword"
+			},
+			"schema:identifier": {
+				"type": "keyword"
+			},
+			"schema:name": {
+				"type": "keyword"
+			}
+		}
+	}
 }
diff --git a/scripts/harvest.sh b/scripts/harvest.sh
new file mode 100755
index 00000000..bacc1e63
--- /dev/null
+++ b/scripts/harvest.sh
@@ -0,0 +1,221 @@
+#!/bin/bash
+
+DATA_DIR=""
+ES_HOST="localhost"
+ES_PORT="9200"
+ENV="dev"
+DOCUMENT_TYPES="all"
+
+ALL_DOCUMENT_TYPES="germplasm germplasmAttribute germplasmPedigree germplasmProgeny location program study trial observationUnit datadiscovery"
+ALL_ENVS="dev beta staging int prod test"
+BASEDIR=$(dirname "$0")
+
+RED='\033[0;31m'
+GREEN='\033[0;32m'
+ORANGE='\033[0;33m'
+BOLD='\033[1m'
+NC='\033[0m' # No format
+
+
+help() {
+	cat <<EOF
+DESCRIPTION: 
+	Script used to index data in FAIDARE
+
+USAGE:
+	${SCRIPT} -jsonDir <JSON directory> -es_host <Elasticsearch node host> -es_port <Elasticsearch node port> -env <application environment name> -type <document type(s) to index> [-h|--help]
+
+PARAMS:
+	-jsonDir        The directory where JSON bulk files to index are
+	-es_host        The hostname or IP of Elasticsearch node (local, dev or prod cluster). Default: $ES_HOST
+	-es_port        The port of Elasticsearch node (local, dev or prod cluster). Default: $ES_PORT
+	-env            The environment name of the targeted FAIDARE application ($(echo $ALL_ENVS | tr ' ' ', ')). Default: $ENV
+	-type           The document type(s) to index, separated by a comma ($(echo $ALL_DOCUMENT_TYPES | tr ' ' ', ')). Default: $DOCUMENT_TYPES
+	-h|--help       Display this message
+	-v|--verbose    Verbose mode
+	--debug         Debug mode (same as set -x)
+
+DEPENDENCIES:
+	- jq 1.6+: https://github.com/stedolan/jq/releases/tag/jq-1.6
+	- GNU parallel: https://www.gnu.org/software/parallel/
+	- gzip: http://www.gzip.org/
+
+EOF
+	exit 1
+}
+
+check_acknowledgment() {
+	local LOG=$1
+	local MSG=$2
+	echo $LOG | jq '.acknowledged? == true' | grep 'true' >/dev/null || {
+		echo -e "${RED}ERROR: a problem occurred when trying to ${MSG}.${NC}"
+		echo -e "${ORANGE}$(echo ${LOG})${NC}"
+		exit 1;
+	}
+}
+
+# Check programs
+MISSING_COUNT=0
+PROGRAMS="gzip parallel jq"
+for PROGRAM in ${PROGRAMS}; do
+	command -v ${PROGRAM} >/dev/null || {
+		echo -e "${ORANGE}Program ${PROGRAM} is missing, cannot continue...${NC}"
+		((MISSING_COUNT += 1))
+	}
+done
+if [ $MISSING_COUNT -ne 0 ]; then 
+	echo -e "${RED}ERROR: You must install the $MISSING_COUNT missing program(s).${NC}"
+	exit $MISSING_COUNT
+fi
+
+# Get and Check parameters
+# any params
+[ -z "$1" ] && echo && help
+# get params
+while [ -n "$1" ]; do
+	case "$1" in
+		-h|--help) help;;
+		-v|--verbose) VERBOSE=1;shift 1;;
+		--debug) set -x;shift 1;;
+		-jsonDir) DATA_DIR="$2"; shift 2;;
+		-es_host) ES_HOST="$2"; shift 2;;
+		-es_port) ES_PORT="$2"; shift 2;;
+		-env) ENV="$2"; shift 2;;
+		-type) DOCUMENT_TYPES=$(echo "$2" | tr ',' ' '); shift 2;;
+		-*) echo -e "${RED}Unknown option: $1 ${NC}\n" echo && help;;
+		*) break;;
+    esac
+done
+
+if [ -z "$ES_HOST" ] || [ -z "$ES_PORT" ]; then
+	echo -e "${RED}ERROR: 'es_host' and 'es_port' parameters are mandatory!${NC}"
+	echo && help
+fi
+if [[ "$ALL_ENVS" != *"$ENV"* ]]; then
+	echo -e "${RED}ERROR: The value of parameter 'env' must be one of the following: ${ALL_ENVS}.${NC}"
+	echo && help
+fi
+if [ ! -d "${DATA_DIR}" ]; then
+	echo -e "${RED}ERROR: Mandatory parameter 'jsonDir' is missing!${NC}"
+	echo && help
+fi
+if [ $(find ${DATA_DIR} -name *.json | wc -l) -le 0 ] && [ $(find ${DATA_DIR} -name *.json.gz | wc -l) -le 0 ]; then
+	echo -e "${RED}ERROR: The JSON directory ${DATA_DIR} contains no JSON files!${NC}"
+	echo && help
+fi
+[ "${DOCUMENT_TYPES}" == "all" ] && DOCUMENT_TYPES = "${ALL_DOCUMENT_TYPES}"
+for DOCUMENT_TYPE in ${DOCUMENT_TYPES}; do
+	if [ $(find ${DATA_DIR} -name ${DOCUMENT}*.json | wc -l) -le 0 ] && [ $(find ${DATA_DIR} -name ${DOCUMENT}*.json.gz | wc -l) -le 0 ]; then
+		echo -e "${ORANGE}WARNING: The JSON directory ${DATA_DIR} contains no ${DOCUMENT} document, so it will be ignored!${NC}"
+	fi
+done
+
+# Compress JSON files
+for FILE in $(find ${DATA_DIR} -name *.json); do
+	gzip $FILE
+done
+
+for DOCUMENT_TYPE in ${DOCUMENT_TYPES}; do
+	echo -e "${BOLD}Manage ${DOCUMENT_TYPE} documents...${NC}"
+	INDEX_PATTERN="faidare_${DOCUMENT_TYPE}_${ENV}"
+	
+	# Create template
+	TEMPLATE_NAME="${INDEX_PATTERN}_template"
+	echo -e "Create setting/mapping template ${TEMPLATE_NAME}..."
+	LOG=$(curl -s -H 'Content-Type: application/json' -XPUT "${ES_HOST}:${ES_PORT}/_template/${TEMPLATE_NAME}" -d"
+{
+	\"index_patterns\": [\"${INDEX_PATTERN}-*\"],
+	\"order\": 101,
+	\"mappings\": 
+		$(cat ${BASEDIR}/../backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/${DOCUMENT_TYPE}_mapping.json),
+	\"settings\": $(cat ${BASEDIR}/../backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/settings.json)
+}")
+	check_acknowledgment "${LOG}" "create template"
+	
+	# Index JSON Bulk
+	INDEX_NAME="${INDEX_PATTERN}-d"$(date +%s)
+	echo -e "Index documents into ${ES_HOST}:${ES_PORT}/${INDEX_NAME} indice..."
+	{
+		time parallel --bar "
+			curl -s -H 'Content-Type: application/x-ndjson' -H 'Content-Encoding: gzip' -H 'Accept-Encoding: gzip' -XPOST ${ES_HOST}:${ES_PORT}/${INDEX_NAME}/_bulk --data-binary '@{}' > {.}.log.gz" \
+		::: $(find ${DATA_DIR} -name ${DOCUMENT_TYPE}*.json.gz)
+	} || {
+		code=$?
+		echo -e "${RED}ERROR: a problem occurred when trying to index data with parallel program.${NC}"
+		exit $code
+	}
+	#echo -e "${RED}ERROR: a problem occurred when trying to index data into ${ES_HOST}:${ES_PORT}/${INDEX_NAME} indice.${NC}"
+	parallel "gunzip -c {} | jq '.errors' | grep -q true && echo -e '${ORANGE}ERROR found in {}${NC}' ;" ::: $(find ${DATA_DIR} -name ${DOCUMENT_TYPE}*.log.gz)
+	
+	# Check indexed data
+	echo -e "Check data indexed from ${DATA_DIR} into ${INDEX_NAME}..."
+	# skip some documents because they contain nested objects that distort the count
+	if [[ "${DOCUMENT_TYPE}" != "germplasmAttribute" && "${DOCUMENT_TYPE}" != "observationUnit" && "${DOCUMENT_TYPE}" != "datadiscovery" ]]; then
+		COUNT_EXTRACTED_DOCS=0
+		for FILE  in $(find ${DATA_DIR} -name ${DOCUMENT_TYPE}*.json.gz); do
+			echo $FILE
+			COUNT_FILE_DOCS=$(zcat ${FILE} | grep "\"_id\"" | sort | uniq | wc -l)
+			COUNT_EXTRACTED_DOCS=$((COUNT_EXTRACTED_DOCS+COUNT_FILE_DOCS))
+		done			
+		COUNT_INDEXED_DOCS=$(curl -s -XGET "${ES_HOST}:${ES_PORT}/_cat/indices/${INDEX_NAME}?h=docs.count" | tr -d ' ')
+	fi
+	if [ "$COUNT_INDEXED_DOCS" != "$COUNT_EXTRACTED_DOCS" ]; then
+		echo -e "${RED}ERROR: a problem occurred when indexing data from ${DATA_DIR} on FAIDARE ${ENV}.${NC}"
+		echo -e "${ORANGE}Expected ${COUNT_EXTRACTED_DOCS} documents but got ${COUNT_INDEXED_DOCS} indexed documents.${NC}"
+		exit 1;
+	fi
+	
+	# Add aliases
+	ALIAS_PATTERN="${INDEX_PATTERN}-group*"
+	echo -e "Delete aliases ${ALIAS_PATTERN}..."
+	echo "curl -s -XGET '${ES_HOST}:${ES_PORT}/_aliases/${ALIAS_PATTERN}'"
+	LOG=$(curl -s -XDELETE "${ES_HOST}:${ES_PORT}/*/_aliases/${ALIAS_PATTERN}")
+	check_acknowledgment "${LOG}" "delete aliases"
+	
+	echo -e "List groupId from ${INDEX_NAME} (to create filtered aliases)..."
+	GROUP_IDS=$(curl -s -H 'Content-Type: application/json' -XGET "${ES_HOST}:${ES_PORT}/${INDEX_NAME}/_search" -d'
+{
+	"size":"0",
+	"aggs" : {
+		"uniq_group" : {
+			"terms" : { "field" : "groupId" }
+		}
+	}
+}' | jq -cr '.aggregations.uniq_group.buckets[].key') # Extract ES aggregation bucket keys
+	[ -z "$GROUP_IDS" ] && {
+		echo -e "${RED}ERROR: could not list 'groupId' values from index.${NC}"
+		exit 1;
+	}
+	echo -e "Create aliases:"	
+	for GROUP_ID in ${GROUP_IDS}; do
+		ALIAS_NAME="${INDEX_PATTERN}-group${GROUP_ID}"
+		FILTER=""
+		if [[ "$GROUP_ID" = "0" || "${GROUP_ID}" =  "null" ]]; then
+			FILTER="{ \"bool\" : { \"must_not\" : { \"exists\" : { \"field\" : \"groupId\" } } } }"
+		else
+			FILTER="{ \"term\" : { \"groupId\" : \"${GROUP_ID}\" } }"
+		fi
+		echo -e "\t${ALIAS_NAME}..."
+		LOG=$(curl -s -H 'Content-Type: application/json' -XPOST "${ES_HOST}:${ES_PORT}/_aliases" -d "
+{
+	\"actions\" : [
+		{
+			\"add\" : {
+				\"index\" : \"${INDEX_NAME}\",
+				\"alias\" : \"${ALIAS_NAME}\",
+				\"filter\" : ${FILTER}
+			}
+		}
+	]
+}")
+		check_acknowledgment "${LOG}" "create aliase"
+	done
+	
+	# Delete all but last created indices (thanks to the timestamp suffix)
+	echo -e "Delete old indices ${INDEX_PATTERN} (to avoid accumulation over time)..."
+	OLD_INDICES=$(curl -sf -XGET "${ES_HOST}:${ES_PORT}/_cat/indices/${INDEX_PATTERN}?h=index" | sort | head -n -1)
+	for OLD_INDEX in ${OLD_INDICES}; do
+		LOG=$(curl -s -XDELETE "${ES_HOST}:${ES_PORT}/${OLD_INDEX}")
+		check_acknowledgment "${LOG}" "delete index ${OLD_INDEX}"
+	done
+done
-- 
GitLab


From 3fa2cc6a64fe5b17a2501d5529405dc84eec1893 Mon Sep 17 00:00:00 2001
From: Celia Michotey <celia.michotey@inra.fr>
Date: Tue, 8 Oct 2019 11:15:35 +0200
Subject: [PATCH 02/11] Correct bugs in indexation script.

---
 scripts/harvest.sh | 39 +++++++++++++++++++++------------------
 1 file changed, 21 insertions(+), 18 deletions(-)

diff --git a/scripts/harvest.sh b/scripts/harvest.sh
index bacc1e63..d91297e8 100755
--- a/scripts/harvest.sh
+++ b/scripts/harvest.sh
@@ -1,12 +1,13 @@
 #!/bin/bash
 
+
 DATA_DIR=""
 ES_HOST="localhost"
 ES_PORT="9200"
 ENV="dev"
 DOCUMENT_TYPES="all"
 
-ALL_DOCUMENT_TYPES="germplasm germplasmAttribute germplasmPedigree germplasmProgeny location program study trial observationUnit datadiscovery"
+ALL_DOCUMENT_TYPES="germplasm germplasm-mcpd germplasmAttribute germplasmPedigree germplasmProgeny location program study trial observationUnit datadiscovery"
 ALL_ENVS="dev beta staging int prod test"
 BASEDIR=$(dirname "$0")
 
@@ -106,7 +107,7 @@ fi
 [ "${DOCUMENT_TYPES}" == "all" ] && DOCUMENT_TYPES = "${ALL_DOCUMENT_TYPES}"
 for DOCUMENT_TYPE in ${DOCUMENT_TYPES}; do
 	if [ $(find ${DATA_DIR} -name ${DOCUMENT}*.json | wc -l) -le 0 ] && [ $(find ${DATA_DIR} -name ${DOCUMENT}*.json.gz | wc -l) -le 0 ]; then
-		echo -e "${ORANGE}WARNING: The JSON directory ${DATA_DIR} contains no ${DOCUMENT} document, so it will be ignored!${NC}"
+		echo -e "${ORANGE}WARNING: The JSON directory ${DATA_DIR} contains no ${DOCUMENT} document!${NC}"
 	fi
 done
 
@@ -116,12 +117,12 @@ for FILE in $(find ${DATA_DIR} -name *.json); do
 done
 
 for DOCUMENT_TYPE in ${DOCUMENT_TYPES}; do
-	echo -e "${BOLD}Manage ${DOCUMENT_TYPE} documents...${NC}"
+	echo && echo -e "${BOLD}Manage ${DOCUMENT_TYPE} documents...${NC}"
 	INDEX_PATTERN="faidare_${DOCUMENT_TYPE}_${ENV}"
 	
 	# Create template
 	TEMPLATE_NAME="${INDEX_PATTERN}_template"
-	echo -e "Create setting/mapping template ${TEMPLATE_NAME}..."
+	echo -e "* Create setting/mapping template ${TEMPLATE_NAME}..."
 	LOG=$(curl -s -H 'Content-Type: application/json' -XPUT "${ES_HOST}:${ES_PORT}/_template/${TEMPLATE_NAME}" -d"
 {
 	\"index_patterns\": [\"${INDEX_PATTERN}-*\"],
@@ -134,9 +135,9 @@ for DOCUMENT_TYPE in ${DOCUMENT_TYPES}; do
 	
 	# Index JSON Bulk
 	INDEX_NAME="${INDEX_PATTERN}-d"$(date +%s)
-	echo -e "Index documents into ${ES_HOST}:${ES_PORT}/${INDEX_NAME} indice..."
+	echo -e "* Index documents into ${ES_HOST}:${ES_PORT}/${INDEX_NAME} indice..."
 	{
-		time parallel --bar "
+		parallel --bar "
 			curl -s -H 'Content-Type: application/x-ndjson' -H 'Content-Encoding: gzip' -H 'Accept-Encoding: gzip' -XPOST ${ES_HOST}:${ES_PORT}/${INDEX_NAME}/_bulk --data-binary '@{}' > {.}.log.gz" \
 		::: $(find ${DATA_DIR} -name ${DOCUMENT_TYPE}*.json.gz)
 	} || {
@@ -148,16 +149,16 @@ for DOCUMENT_TYPE in ${DOCUMENT_TYPES}; do
 	parallel "gunzip -c {} | jq '.errors' | grep -q true && echo -e '${ORANGE}ERROR found in {}${NC}' ;" ::: $(find ${DATA_DIR} -name ${DOCUMENT_TYPE}*.log.gz)
 	
 	# Check indexed data
-	echo -e "Check data indexed from ${DATA_DIR} into ${INDEX_NAME}..."
+	echo -e "* Check data indexed from ${DATA_DIR} into ${INDEX_NAME}..."
 	# skip some documents because they contain nested objects that distort the count
 	if [[ "${DOCUMENT_TYPE}" != "germplasmAttribute" && "${DOCUMENT_TYPE}" != "observationUnit" && "${DOCUMENT_TYPE}" != "datadiscovery" ]]; then
 		COUNT_EXTRACTED_DOCS=0
-		for FILE  in $(find ${DATA_DIR} -name ${DOCUMENT_TYPE}*.json.gz); do
-			echo $FILE
+		for FILE in $(find ${DATA_DIR} -name ${DOCUMENT_TYPE}*.json.gz); do
 			COUNT_FILE_DOCS=$(zcat ${FILE} | grep "\"_id\"" | sort | uniq | wc -l)
 			COUNT_EXTRACTED_DOCS=$((COUNT_EXTRACTED_DOCS+COUNT_FILE_DOCS))
-		done			
-		COUNT_INDEXED_DOCS=$(curl -s -XGET "${ES_HOST}:${ES_PORT}/_cat/indices/${INDEX_NAME}?h=docs.count" | tr -d ' ')
+		done
+		curl -s -XGET "${ES_HOST}:${ES_PORT}/${INDEX_NAME}/_refresh" >/dev/null
+		COUNT_INDEXED_DOCS=$(curl -s -XGET "${ES_HOST}:${ES_PORT}/_cat/indices/${INDEX_NAME}?h=docs.count")
 	fi
 	if [ "$COUNT_INDEXED_DOCS" != "$COUNT_EXTRACTED_DOCS" ]; then
 		echo -e "${RED}ERROR: a problem occurred when indexing data from ${DATA_DIR} on FAIDARE ${ENV}.${NC}"
@@ -167,12 +168,14 @@ for DOCUMENT_TYPE in ${DOCUMENT_TYPES}; do
 	
 	# Add aliases
 	ALIAS_PATTERN="${INDEX_PATTERN}-group*"
-	echo -e "Delete aliases ${ALIAS_PATTERN}..."
-	echo "curl -s -XGET '${ES_HOST}:${ES_PORT}/_aliases/${ALIAS_PATTERN}'"
-	LOG=$(curl -s -XDELETE "${ES_HOST}:${ES_PORT}/*/_aliases/${ALIAS_PATTERN}")
-	check_acknowledgment "${LOG}" "delete aliases"
+	ALIAS_EXIST=$(curl -s -XGET "${ES_HOST}:${ES_PORT}/_alias/${ALIAS_PATTERN}" | jq '.status' | grep -q "404" && echo "false" || echo "true")
+	if [ "${ALIAS_EXIST}" == "true" ]; then
+		echo -e "* Delete aliases ${ALIAS_PATTERN}..."
+		LOG=$(curl -s -XDELETE "${ES_HOST}:${ES_PORT}/*/_aliases/${ALIAS_PATTERN}")
+		check_acknowledgment "${LOG}" "delete aliases"
+	fi
 	
-	echo -e "List groupId from ${INDEX_NAME} (to create filtered aliases)..."
+	echo -e "* List groupId from ${INDEX_NAME} (to create filtered aliases)..."
 	GROUP_IDS=$(curl -s -H 'Content-Type: application/json' -XGET "${ES_HOST}:${ES_PORT}/${INDEX_NAME}/_search" -d'
 {
 	"size":"0",
@@ -186,7 +189,7 @@ for DOCUMENT_TYPE in ${DOCUMENT_TYPES}; do
 		echo -e "${RED}ERROR: could not list 'groupId' values from index.${NC}"
 		exit 1;
 	}
-	echo -e "Create aliases:"	
+	echo -e "* Create aliases:"	
 	for GROUP_ID in ${GROUP_IDS}; do
 		ALIAS_NAME="${INDEX_PATTERN}-group${GROUP_ID}"
 		FILTER=""
@@ -212,7 +215,7 @@ for DOCUMENT_TYPE in ${DOCUMENT_TYPES}; do
 	done
 	
 	# Delete all but last created indices (thanks to the timestamp suffix)
-	echo -e "Delete old indices ${INDEX_PATTERN} (to avoid accumulation over time)..."
+	echo -e "* Delete old indices ${INDEX_PATTERN} (to avoid accumulation over time)..."
 	OLD_INDICES=$(curl -sf -XGET "${ES_HOST}:${ES_PORT}/_cat/indices/${INDEX_PATTERN}?h=index" | sort | head -n -1)
 	for OLD_INDEX in ${OLD_INDICES}; do
 		LOG=$(curl -s -XDELETE "${ES_HOST}:${ES_PORT}/${OLD_INDEX}")
-- 
GitLab


From 5dad7bafbe8d536e35f10069b3552dcd5da51f0a Mon Sep 17 00:00:00 2001
From: Celia Michotey <celia.michotey@inra.fr>
Date: Tue, 8 Oct 2019 13:14:24 +0200
Subject: [PATCH 03/11] Update mappings to be coherent with generated JSON
 format.

---
 .../repository/es/setup/index/README.md       |    2 -
 .../es/setup/index/datadiscovery_mapping.json |  151 ++-
 .../index/germplasmAttribute_mapping.json     |   98 +-
 .../index/germplasmPedigree_mapping.json      |  136 +-
 .../setup/index/germplasmProgeny_mapping.json |   82 +-
 .../es/setup/index/germplasm_mapping.json     | 1103 +++++++++--------
 .../es/setup/index/location_mapping.json      |  128 +-
 .../setup/index/observationUnit_mapping.json  |  451 +++----
 .../es/setup/index/program_mapping.json       |   20 +-
 .../repository/es/setup/index/settings.json   |   80 +-
 .../es/setup/index/study_mapping.json         |  273 ++--
 .../es/setup/index/transplant_mapping.json    |   22 +-
 .../es/setup/index/trial_mapping.json         |  246 ++--
 13 files changed, 1510 insertions(+), 1282 deletions(-)

diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/README.md b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/README.md
index f5a7b39f..2f959242 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/README.md
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/README.md
@@ -1,7 +1,5 @@
 This directory contains document mappings and index settings for FAIDARE Elasticsearch documents.
 
-This directory is a copy of the directory from the GnpIS `database` git repository with the path: `GnpIS/elasticsearch/template/gnpis`.
-
 
 # Custom analyzers
 
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/datadiscovery_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/datadiscovery_mapping.json
index eb223e17..331335a1 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/datadiscovery_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/datadiscovery_mapping.json
@@ -1,80 +1,79 @@
 {
-  "datadiscovery": {
-    "dynamic": false,
-    "_source": {
-      "includes": ["@id", "@type", "schema:*", "groupId"]
-    },
-    "properties": {
-      "groupId": {
-        "type": "long"
-      },
+	"datadiscovery": {
+		"dynamic": "strict",
+		"_source": {
+			"includes": ["@id", "@type", "schema:*", "groupId"]
+		},
+		"properties": {
+			"groupId": {
+				"type": "long"
+			},
+			"@type": {
+				"type": "keyword"
+			},
+			"@id": {
+				"type": "keyword"
+			},
+			"schema:includedInDataCatalog": {
+				"type": "keyword"
+			},
+			"schema:identifier": {
+				"type": "keyword"
+			},
+			"schema:name": {
+				"type": "keyword"
+			},
+			"schema:url": {
+				"type": "keyword"
+			},
+			"schema:description": {
+				"type": "keyword"
+			},
 
-      "@type": {
-        "type": "keyword"
-      },
-      "@id": {
-        "type": "keyword"
-      },
-      "schema:includedInDataCatalog": {
-        "type": "keyword"
-      },
-      "schema:identifier": {
-        "type": "keyword"
-      },
-      "schema:name": {
-        "type": "keyword"
-      },
-      "schema:url": {
-        "type": "keyword"
-      },
-      "schema:description": {
-        "type": "keyword"
-      },
+			"germplasm": {
+				"type": "object",
+				"properties": {
+					"cropName": {
+						"type": "keyword",
+						"fields": {
+							"suggest": {
+								"type": "text",
+								"search_analyzer": "search_suggester",
+								"analyzer": "index_suggester"
+							}
+						}
+					},
+					"germplasmList": {
+						"type": "keyword",
+						"fields": {
+							"suggest": {
+								"type": "text",
+								"search_analyzer": "search_suggester",
+								"analyzer": "index_suggester"
+							}
+						}
+					},
+					"accession": {
+						"type": "keyword",
+						"fields": {
+							"suggest": {
+								"type": "text",
+								"search_analyzer": "search_suggester",
+								"analyzer": "index_suggester"
+							}
+						}
+					}
+				}
+			},
 
-      "germplasm": {
-        "type": "object",
-        "properties": {
-          "cropName": {
-            "type": "keyword",
-            "fields": {
-              "suggest": {
-                "type": "text",
-                "search_analyzer": "search_suggester",
-                "analyzer": "index_suggester"
-              }
-            }
-          },
-          "germplasmList": {
-            "type": "keyword",
-            "fields": {
-              "suggest": {
-                "type": "text",
-                "search_analyzer": "search_suggester",
-                "analyzer": "index_suggester"
-              }
-            }
-          },
-          "accession": {
-            "type": "keyword",
-            "fields": {
-              "suggest": {
-                "type": "text",
-                "search_analyzer": "search_suggester",
-                "analyzer": "index_suggester"
-              }
-            }
-          }
-        }
-      },
-
-      "trait": {
-        "type": "object",
-        "properties": {
-          "observationVariableIds": {
-            "type": "keyword"
-          }
-        }
-      }
-    }
-  }
+			"trait": {
+				"type": "object",
+				"properties": {
+					"observationVariableIds": {
+						"type": "keyword"
+					}
+				}
+			}
+		}
+	}
 }
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmAttribute_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmAttribute_mapping.json
index cfb34f97..6a7c900b 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmAttribute_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmAttribute_mapping.json
@@ -1,40 +1,60 @@
 {
-  "germplasmAttribute": {
-    "dynamic": false,
-    "properties": {
-      "groupId": {
-        "type": "long"
-      },
-      "source": {
-        "type": "keyword"
-      },
-      "speciesGroup": {
-        "type": "long"
-      },
-      "germplasmDbId": {
-        "type": "keyword"
-      },
-      "data": {
-        "type": "nested",
-        "properties": {
-          "attributeDbId": {
-            "type": "keyword"
-          },
-          "attributeName": {
-            "type": "keyword"
-          },
-          "attributeCode": {
-            "type": "keyword"
-          },
-          "value": {
-            "type": "keyword"
-          },
-          "determinedDate": {
-            "type": "date",
-            "format": "YYYY-MM-dd"
-          }
-        }
-      }
-    }
-  }
-}
+	"germplasmAttribute": {
+		"dynamic": "strict",
+		"properties": {
+			"germplasmDbId": {
+				"type": "keyword"
+			},
+			"data": {
+				"type": "nested",
+				"properties": {
+					"attributeDbId": {
+						"type": "keyword"
+					},
+					"attributeName": {
+						"type": "keyword"
+					},
+					"attributeCode": {
+						"type": "keyword"
+					},
+					"value": {
+						"type": "keyword"
+					},
+					"determinedDate": {
+						"type": "date",
+						"format": "YYYY-MM-dd"
+					}
+				}
+			},
+
+			"documentationURL": {
+				"type": "keyword"
+			},
+			"source": {
+				"type": "keyword"
+			},
+
+			"groupId": {
+				"type": "long"
+			},
+			"@type": {
+				"type": "keyword"
+			},
+			"@id": {
+				"type": "keyword"
+			},
+			"schema:includedInDataCatalog": {
+				"type": "keyword"
+			},
+			"schema:identifier": {
+				"type": "keyword"
+			},
+			"schema:name": {
+				"type": "keyword"
+			},
+			"schema:url": {
+				"type": "keyword"
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmPedigree_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmPedigree_mapping.json
index 2952343f..ad7070d9 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmPedigree_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmPedigree_mapping.json
@@ -1,58 +1,82 @@
 {
-  "germplasmPedigree": {
-    "properties": {
-      "docId": {
-        "type": "keyword"
-      },
-      "groupId": {
-        "type": "long"
-      },
-      "siblings": {
-        "properties": {
-          "defaultDisplayName": {
-            "type": "keyword"
-          },
-          "germplasmDbId": {
-            "type": "keyword"
-          }
-        }
-      },
-      "parent1DbId": {
-        "type": "keyword"
-      },
-      "parent2Name": {
-        "type": "keyword"
-      },
-      "familyCode": {
-        "type": "keyword"
-      },
-      "germplasmDbId": {
-        "type": "keyword"
-      },
-      "parent1Type": {
-        "type": "keyword"
-      },
-      "pedigree": {
-        "type": "keyword"
-      },
-      "parent2DbId": {
-        "type": "keyword"
-      },
-      "defaultDisplayName": {
-        "type": "keyword"
-      },
-      "crossingPlan": {
-        "type": "keyword"
-      },
-      "parent2Type": {
-        "type": "keyword"
-      },
-      "parent1Name": {
-        "type": "keyword"
-      },
-      "crossingYear": {
-        "type": "keyword"
-      }
-    }
-  }
+	"germplasmPedigree": {
+		"dynamic": "strict",
+		"properties": {
+			"germplasmDbId": {
+				"type": "keyword"
+			},
+			"defaultDisplayName": {
+				"type": "keyword"
+			},
+			"pedigree": {
+				"type": "keyword"
+			},
+			"crossingPlan": {
+				"type": "keyword"
+			},
+			"crossingYear": {
+				"type": "keyword"
+			},
+			"familyCode": {
+				"type": "keyword"
+			},
+			"parent1DbId": {
+				"type": "keyword"
+			},
+			"parent1Name": {
+				"type": "keyword"
+			},
+			"parent1Type": {
+				"type": "keyword"
+			},
+			"parent2DbId": {
+				"type": "keyword"
+			},
+			"parent2Name": {
+				"type": "keyword"
+			},
+			"parent2Type": {
+				"type": "keyword"
+			},
+			"siblings": {
+				"properties": {
+					"germplasmDbId": {
+						"type": "keyword"
+					},
+					"defaultDisplayName": {
+						"type": "keyword"
+					}
+				}
+			},
+
+			"documentationURL": {
+				"type": "keyword"
+			},
+			"source": {
+				"type": "keyword"
+			},
+
+			"groupId": {
+				"type": "long"
+			},
+			"@type": {
+				"type": "keyword"
+			},
+			"@id": {
+				"type": "keyword"
+			},
+			"schema:includedInDataCatalog": {
+				"type": "keyword"
+			},
+			"schema:identifier": {
+				"type": "keyword"
+			},
+			"schema:name": {
+				"type": "keyword"
+			},
+			"schema:url": {
+				"type": "keyword"
+			}
+		}
+	}
 }
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmProgeny_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmProgeny_mapping.json
index c47f5c46..cdfe1cc4 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmProgeny_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmProgeny_mapping.json
@@ -1,31 +1,55 @@
 {
-  "germplasmProgeny": {
-    "properties": {
-      "docId": {
-        "type": "keyword"
-      },
-      "groupId": {
-        "type": "long"
-      },
-      "germplasmDbId": {
-        "type": "keyword"
-      },
-      "defaultDisplayName": {
-        "type": "keyword"
-      },
-      "progeny": {
-        "properties": {
-          "defaultDisplayName": {
-            "type": "keyword"
-          },
-          "germplasmDbId": {
-            "type": "keyword"
-          },
-          "parentType": {
-            "type": "keyword"
-          }
-        }
-      }
-    }
-  }
+	"germplasmProgeny": {
+		"dynamic": "strict",
+		"properties": {
+			"germplasmDbId": {
+				"type": "keyword"
+			},
+			"defaultDisplayName": {
+				"type": "keyword"
+			},
+			"progeny": {
+				"properties": {
+					"germplasmDbId": {
+						"type": "keyword"
+					},
+					"defaultDisplayName": {
+						"type": "keyword"
+					},
+					"parentType": {
+						"type": "keyword"
+					}
+				}
+			},
+
+			"documentationURL": {
+				"type": "keyword"
+			},
+			"source": {
+				"type": "keyword"
+			},
+
+			"groupId": {
+				"type": "long"
+			},
+			"@type": {
+				"type": "keyword"
+			},
+			"@id": {
+				"type": "keyword"
+			},
+			"schema:includedInDataCatalog": {
+				"type": "keyword"
+			},
+			"schema:identifier": {
+				"type": "keyword"
+			},
+			"schema:name": {
+				"type": "keyword"
+			},
+			"schema:url": {
+				"type": "keyword"
+			}
+		}
+	}
 }
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasm_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasm_mapping.json
index 8f7ca21e..2c5cd2b5 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasm_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasm_mapping.json
@@ -1,539 +1,568 @@
 {
-  "germplasm": {
-    "dynamic": false,
-    "properties": {
-      "groupId": {
-        "type": "long"
-      },
-      "source": {
-        "type": "keyword"
-      },
-      "documentationURL": {
-        "type": "keyword"
-      },
-      "germplasmDbId": {
-        "type": "keyword"
-      },
-      "defaultDisplayName": {
-        "type": "keyword"
-      },
-      "accessionNumber": {
-        "type": "keyword",
-        "doc_values": true
-      },
-      "germplasmName": {
-        "type": "keyword",
-        "doc_values": true
-      },
-      "germplasmPUI": {
-        "type": "keyword"
-      },
-      "pedigree": {
-        "type": "keyword"
-      },
-      "seedSource": {
-        "type": "keyword"
-      },
-      "synonyms": {
-        "type": "keyword",
-        "doc_values": true
-      },
-      "commonCropName": {
-        "type": "keyword",
-        "doc_values": true
-      },
-      "instituteCode": {
-        "type": "keyword"
-      },
-      "instituteName": {
-        "type": "keyword"
-      },
-      "biologicalStatusOfAccessionCode": {
-        "type": "keyword"
-      },
-      "countryOfOriginCode": {
-        "type": "keyword"
-      },
-      "typeOfGermplasmStorageCode": {
-        "type": "keyword"
-      },
-      "taxonIds": {
-        "properties": {
-          "sourceName": {
-            "type": "keyword"
-          },
-          "taxonId": {
-            "type": "keyword"
-          }
-        }
-      },
-      "genus": {
-        "type": "keyword",
-        "doc_values": true
-      },
-      "species": {
-        "type": "keyword"
-      },
-      "speciesAuthority": {
-        "type": "keyword"
-      },
-      "subtaxa": {
-        "type": "keyword"
-      },
-      "subtaxaAuthority": {
-        "type": "keyword"
-      },
-      "donors": {
-        "properties": {
-          "donorInstituteCode": {
-            "type": "keyword"
-          },
-          "donorGermplasmPUI": {
-            "type": "keyword"
-          },
-          "donorAccessionNumber": {
-            "type": "keyword"
-          },
-          "donorInstitute": {
-            "properties": {
-              "instituteName": {
-                "type": "keyword"
-              },
-              "instituteCode": {
-                "type": "keyword"
-              },
-              "acronym": {
-                "type": "keyword"
-              },
-              "organisation": {
-                "type": "keyword"
-              },
-              "instituteType": {
-                "type": "keyword"
-              },
-              "webSite": {
-                "type": "keyword"
-              },
-              "address": {
-                "type": "keyword"
-              },
-              "logo": {
-                "type": "keyword"
-              }
-            }
-          },
-          "donationDate": {
-            "type": "integer"
-          }
-        }
-      },
-      "acquisitionDate": {
-        "type": "keyword"
-      },
-      "genusSpecies": {
-        "type": "keyword",
-        "doc_values": true
-      },
-      "genusSpeciesSubtaxa": {
-        "type": "keyword",
-        "doc_values": true
-      },
-      "taxonSynonyms": {
-        "type": "keyword",
-        "doc_values": true
-      },
-      "taxonCommonNames": {
-        "type": "keyword",
-        "doc_values": true
-      },
-      "geneticNature": {
-        "type": "keyword"
-      },
-      "comment": {
-        "type": "keyword"
-      },
-      "photo": {
-        "properties": {
-          "fileName": {
-            "type": "keyword"
-          },
-          "thumbnailFileName": {
-            "type": "keyword"
-          },
-          "photoName": {
-            "type": "keyword"
-          },
-          "description": {
-            "type": "keyword"
-          },
-          "copyright": {
-            "type": "keyword"
-          }
-        }
-      },
-      "holdingInstitute": {
-        "properties": {
-          "instituteName": {
-            "type": "keyword"
-          },
-          "instituteCode": {
-            "type": "keyword"
-          },
-          "acronym": {
-            "type": "keyword"
-          },
-          "organisation": {
-            "type": "keyword"
-          },
-          "instituteType": {
-            "type": "keyword"
-          },
-          "webSite": {
-            "type": "keyword"
-          },
-          "address": {
-            "type": "keyword"
-          },
-          "logo": {
-            "type": "keyword"
-          }
-        }
-      },
-      "holdingGenbank": {
-        "properties": {
-          "instituteName": {
-            "type": "keyword",
-            "doc_values": true
-          },
-          "instituteCode": {
-            "type": "keyword"
-          },
-          "webSite": {
-            "type": "keyword"
-          }
-        }
-      },
-      "presenceStatus": {
-        "type": "keyword"
-      },
-      "genealogy": {
-        "properties": {
-          "crossingPlan": {
-            "type": "keyword"
-          },
-          "crossingYear": {
-            "type": "keyword"
-          },
-          "familyCode": {
-            "type": "keyword"
-          },
-          "firstParentName": {
-            "type": "keyword"
-          },
-          "firstParentPUI": {
-            "type": "keyword"
-          },
-          "firstParentType": {
-            "type": "keyword"
-          },
-          "secondParentName": {
-            "type": "keyword"
-          },
-          "secondParentPUI": {
-            "type": "keyword"
-          },
-          "secondParentType": {
-            "type": "keyword"
-          },
-          "sibblings": {
-            "properties": {
-              "pui": {
-                "type": "keyword"
-              },
-              "name": {
-                "type": "keyword"
-              }
-            }
-          }
-        }
-      },
-      "children": {
-        "properties": {
-          "firstParentName": {
-            "type": "keyword"
-          },
-          "firstParentPUI": {
-            "type": "keyword"
-          },
-          "secondParentName": {
-            "type": "keyword"
-          },
-          "secondParentPUI": {
-            "type": "keyword"
-          },
-          "sibblings": {
-            "properties": {
-              "pui": {
-                "type": "keyword"
-              },
-              "name": {
-                "type": "keyword"
-              }
-            }
-          }
-        }
-      },
-      "descriptors": {
-        "properties": {
-          "name": {
-            "type": "keyword"
-          },
-          "value": {
-            "type": "keyword"
-          }
-        }
-      },
-      "originSite": {
-        "properties": {
-          "siteId": {
-            "type": "long"
-          },
-          "siteName": {
-            "type": "keyword"
-          },
-          "latitude": {
-            "type": "float"
-          },
-          "longitude": {
-            "type": "float"
-          },
-          "siteType": {
-            "type": "keyword"
-          }
-        }
-      },
-      "collectingSite": {
-        "properties": {
-          "siteId": {
-            "type": "long"
-          },
-          "siteName": {
-            "type": "keyword"
-          },
-          "latitude": {
-            "type": "float"
-          },
-          "longitude": {
-            "type": "float"
-          },
-          "siteType": {
-            "type": "keyword"
-          }
-        }
-      },
-      "evaluationSites": {
-        "properties": {
-          "siteId": {
-            "type": "long"
-          },
-          "siteName": {
-            "type": "keyword"
-          },
-          "latitude": {
-            "type": "float"
-          },
-          "longitude": {
-            "type": "float"
-          },
-          "siteType": {
-            "type": "keyword"
-          }
-        }
-      },
-      "collector": {
-        "properties": {
-          "institute": {
-            "properties": {
-              "instituteName": {
-                "type": "keyword"
-              },
-              "instituteCode": {
-                "type": "keyword"
-              },
-              "acronym": {
-                "type": "keyword"
-              },
-              "organisation": {
-                "type": "keyword"
-              },
-              "instituteType": {
-                "type": "keyword"
-              },
-              "webSite": {
-                "type": "keyword"
-              },
-              "address": {
-                "type": "keyword"
-              },
-              "logo": {
-                "type": "keyword"
-              }
-            }
-          },
-          "accessionNumber": {
-            "type": "keyword"
-          },
-          "accessionCreationDate": {
-            "type": "integer"
-          },
-          "materialType": {
-            "type": "keyword"
-          },
-          "collectors": {
-            "type": "keyword"
-          }
-        }
-      },
-      "breeder": {
-        "properties": {
-          "institute": {
-            "properties": {
-              "instituteName": {
-                "type": "keyword"
-              },
-              "instituteCode": {
-                "type": "keyword"
-              },
-              "acronym": {
-                "type": "keyword"
-              },
-              "organisation": {
-                "type": "keyword"
-              },
-              "instituteType": {
-                "type": "keyword"
-              },
-              "webSite": {
-                "type": "keyword"
-              },
-              "address": {
-                "type": "keyword"
-              },
-              "logo": {
-                "type": "keyword"
-              }
-            }
-          },
-          "accessionNumber": {
-            "type": "keyword"
-          },
-          "accessionCreationDate": {
-            "type": "integer"
-          },
-          "registrationYear": {
-            "type": "integer"
-          },
-          "deregistrationYear": {
-            "type": "integer"
-          }
-        }
-      },
-      "distributors": {
-        "properties": {
-          "institute": {
-            "properties": {
-              "instituteName": {
-                "type": "keyword"
-              },
-              "instituteCode": {
-                "type": "keyword"
-              },
-              "acronym": {
-                "type": "keyword"
-              },
-              "organisation": {
-                "type": "keyword"
-              },
-              "instituteType": {
-                "type": "keyword"
-              },
-              "webSite": {
-                "type": "keyword"
-              },
-              "address": {
-                "type": "keyword"
-              },
-              "logo": {
-                "type": "keyword"
-              }
-            }
-          },
-          "accessionNumber": {
-            "type": "keyword"
-          },
-          "distributionStatus": {
-            "type": "keyword"
-          }
-        }
-      },
-      "panel": {
-        "properties": {
-          "id": {
-            "type": "long"
-          },
-          "name": {
-            "type": "keyword",
-            "doc_values": true
-          },
-          "germplasmCount": {
-            "type": "integer"
-          }
-        }
-      },
-      "collection": {
-        "properties": {
-          "id": {
-            "type": "long"
-          },
-          "name": {
-            "type": "keyword",
-            "doc_values": true
-          },
-          "type": {
-            "type": "keyword"
-          },
-          "germplasmCount": {
-            "type": "integer"
-          }
-        }
-      },
-      "population": {
-        "properties": {
-          "id": {
-            "type": "long"
-          },
-          "name": {
-            "type": "keyword",
-            "doc_values": true
-          },
-          "type": {
-            "type": "keyword"
-          },
-          "germplasmRef": {
-            "properties": {
-              "pui": {
-                "type": "keyword"
-              },
-              "name": {
-                "type": "keyword"
-              }
-            }
-          },
-          "germplasmCount": {
-            "type": "integer"
-          }
-        }
-      }
-    }
-  }
+	"germplasm": {
+		"dynamic": "strict",
+		"properties": {
+			"germplasmDbId": {
+				"type": "keyword"
+			},
+			"defaultDisplayName": {
+				"type": "keyword"
+			},
+			"accessionNumber": {
+				"type": "keyword",
+				"doc_values": true
+			},
+			"germplasmName": {
+				"type": "keyword",
+				"doc_values": true
+			},
+			"germplasmPUI": {
+				"type": "keyword"
+			},
+			"pedigree": {
+				"type": "keyword"
+			},
+			"seedSource": {
+				"type": "keyword"
+			},
+			"synonyms": {
+				"type": "keyword",
+				"doc_values": true
+			},
+			"commonCropName": {
+				"type": "keyword",
+				"doc_values": true
+			},
+			"instituteCode": {
+				"type": "keyword"
+			},
+			"instituteName": {
+				"type": "keyword"
+			},
+			"biologicalStatusOfAccessionCode": {
+				"type": "keyword"
+			},
+			"countryOfOriginCode": {
+				"type": "keyword"
+			},
+			"typeOfGermplasmStorageCode": {
+				"type": "keyword"
+			},
+			"taxonIds": {
+				"properties": {
+					"sourceName": {
+						"type": "keyword"
+					},
+					"taxonId": {
+						"type": "keyword"
+					}
+				}
+			},
+			"genus": {
+				"type": "keyword",
+				"doc_values": true
+			},
+			"species": {
+				"type": "keyword"
+			},
+			"speciesAuthority": {
+				"type": "keyword"
+			},
+			"subtaxa": {
+				"type": "keyword"
+			},
+			"subtaxaAuthority": {
+				"type": "keyword"
+			},
+			"donors": {
+				"properties": {
+					"donorInstituteCode": {
+						"type": "keyword"
+					},
+					"donorGermplasmPUI": {
+						"type": "keyword"
+					},
+					"donorAccessionNumber": {
+						"type": "keyword"
+					},
+					"donorInstitute": {
+						"properties": {
+							"instituteName": {
+								"type": "keyword"
+							},
+							"instituteCode": {
+								"type": "keyword"
+							},
+							"acronym": {
+								"type": "keyword"
+							},
+							"organisation": {
+								"type": "keyword"
+							},
+							"instituteType": {
+								"type": "keyword"
+							},
+							"webSite": {
+								"type": "keyword"
+							},
+							"address": {
+								"type": "keyword"
+							},
+							"logo": {
+								"type": "keyword"
+							}
+						}
+					},
+					"donationDate": {
+						"type": "integer"
+					}
+				}
+			},
+			"acquisitionDate": {
+				"type": "keyword"
+			},
+			"genusSpecies": {
+				"type": "keyword",
+				"doc_values": true
+			},
+			"genusSpeciesSubtaxa": {
+				"type": "keyword",
+				"doc_values": true
+			},
+			"taxonSynonyms": {
+				"type": "keyword",
+				"doc_values": true
+			},
+			"taxonCommonNames": {
+				"type": "keyword",
+				"doc_values": true
+			},
+			"taxonComment": {
+				"type": "keyword"
+			},
+			"geneticNature": {
+				"type": "keyword"
+			},
+			"comment": {
+				"type": "keyword"
+			},
+			"photo": {
+				"properties": {
+					"file": {
+						"type": "keyword"
+					},
+					"thumbnailFile": {
+						"type": "keyword"
+					},
+					"photoName": {
+						"type": "keyword"
+					},
+					"description": {
+						"type": "keyword"
+					},
+					"copyright": {
+						"type": "keyword"
+					}
+				}
+			},
+			"holdingInstitute": {
+				"properties": {
+					"instituteName": {
+						"type": "keyword"
+					},
+					"instituteCode": {
+						"type": "keyword"
+					},
+					"acronym": {
+						"type": "keyword"
+					},
+					"organisation": {
+						"type": "keyword"
+					},
+					"instituteType": {
+						"type": "keyword"
+					},
+					"webSite": {
+						"type": "keyword"
+					},
+					"address": {
+						"type": "keyword"
+					},
+					"logo": {
+						"type": "keyword"
+					}
+				}
+			},
+			"holdingGenbank": {
+				"properties": {
+					"instituteName": {
+						"type": "keyword",
+						"doc_values": true
+					},
+					"instituteCode": {
+						"type": "keyword"
+					},
+					"webSite": {
+						"type": "keyword"
+					},
+					"logo": {
+						"type": "keyword"
+					}
+				}
+			},
+			"presenceStatus": {
+				"type": "keyword"
+			},
+			"genealogy": {
+				"properties": {
+					"crossingPlan": {
+						"type": "keyword"
+					},
+					"crossingYear": {
+						"type": "keyword"
+					},
+					"familyCode": {
+						"type": "keyword"
+					},
+					"firstParentName": {
+						"type": "keyword"
+					},
+					"firstParentPUI": {
+						"type": "keyword"
+					},
+					"firstParentType": {
+						"type": "keyword"
+					},
+					"secondParentName": {
+						"type": "keyword"
+					},
+					"secondParentPUI": {
+						"type": "keyword"
+					},
+					"secondParentType": {
+						"type": "keyword"
+					},
+					"sibblings": {
+						"properties": {
+							"pui": {
+								"type": "keyword"
+							},
+							"name": {
+								"type": "keyword"
+							}
+						}
+					}
+				}
+			},
+			"children": {
+				"properties": {
+					"firstParentName": {
+						"type": "keyword"
+					},
+					"firstParentPUI": {
+						"type": "keyword"
+					},
+					"secondParentName": {
+						"type": "keyword"
+					},
+					"secondParentPUI": {
+						"type": "keyword"
+					},
+					"sibblings": {
+						"properties": {
+							"pui": {
+								"type": "keyword"
+							},
+							"name": {
+								"type": "keyword"
+							}
+						}
+					}
+				}
+			},
+			"descriptors": {
+				"properties": {
+					"name": {
+						"type": "keyword"
+					},
+					"value": {
+						"type": "keyword"
+					}
+				}
+			},
+			"originSite": {
+				"properties": {
+					"siteId": {
+						"type": "long"
+					},
+					"siteName": {
+						"type": "keyword"
+					},
+					"latitude": {
+						"type": "float"
+					},
+					"longitude": {
+						"type": "float"
+					},
+					"siteType": {
+						"type": "keyword"
+					}
+				}
+			},
+			"collectingSite": {
+				"properties": {
+					"siteId": {
+						"type": "long"
+					},
+					"siteName": {
+						"type": "keyword"
+					},
+					"latitude": {
+						"type": "float"
+					},
+					"longitude": {
+						"type": "float"
+					},
+					"siteType": {
+						"type": "keyword"
+					}
+				}
+			},
+			"evaluationSites": {
+				"properties": {
+					"siteId": {
+						"type": "long"
+					},
+					"siteName": {
+						"type": "keyword"
+					},
+					"latitude": {
+						"type": "float"
+					},
+					"longitude": {
+						"type": "float"
+					},
+					"siteType": {
+						"type": "keyword"
+					}
+				}
+			},
+			"collector": {
+				"properties": {
+					"institute": {
+						"properties": {
+							"instituteName": {
+								"type": "keyword"
+							},
+							"instituteCode": {
+								"type": "keyword"
+							},
+							"acronym": {
+								"type": "keyword"
+							},
+							"organisation": {
+								"type": "keyword"
+							},
+							"instituteType": {
+								"type": "keyword"
+							},
+							"webSite": {
+								"type": "keyword"
+							},
+							"address": {
+								"type": "keyword"
+							},
+							"logo": {
+								"type": "keyword"
+							}
+						}
+					},
+					"accessionNumber": {
+						"type": "keyword"
+					},
+					"accessionCreationDate": {
+						"type": "integer"
+					},
+					"materialType": {
+						"type": "keyword"
+					},
+					"collectors": {
+						"type": "keyword"
+					}
+				}
+			},
+			"breeder": {
+				"properties": {
+					"institute": {
+						"properties": {
+							"instituteName": {
+								"type": "keyword"
+							},
+							"instituteCode": {
+								"type": "keyword"
+							},
+							"acronym": {
+								"type": "keyword"
+							},
+							"organisation": {
+								"type": "keyword"
+							},
+							"instituteType": {
+								"type": "keyword"
+							},
+							"webSite": {
+								"type": "keyword"
+							},
+							"address": {
+								"type": "keyword"
+							},
+							"logo": {
+								"type": "keyword"
+							}
+						}
+					},
+					"accessionNumber": {
+						"type": "keyword"
+					},
+					"accessionCreationDate": {
+						"type": "integer"
+					},
+					"registrationYear": {
+						"type": "integer"
+					},
+					"deregistrationYear": {
+						"type": "integer"
+					}
+				}
+			},
+			"distributors": {
+				"properties": {
+					"institute": {
+						"properties": {
+							"instituteName": {
+								"type": "keyword"
+							},
+							"instituteCode": {
+								"type": "keyword"
+							},
+							"acronym": {
+								"type": "keyword"
+							},
+							"organisation": {
+								"type": "keyword"
+							},
+							"instituteType": {
+								"type": "keyword"
+							},
+							"webSite": {
+								"type": "keyword"
+							},
+							"address": {
+								"type": "keyword"
+							},
+							"logo": {
+								"type": "keyword"
+							}
+						}
+					},
+					"accessionNumber": {
+						"type": "keyword"
+					},
+					"distributionStatus": {
+						"type": "keyword"
+					}
+				}
+			},
+			"panel": {
+				"properties": {
+					"id": {
+						"type": "long"
+					},
+					"name": {
+						"type": "keyword",
+						"doc_values": true
+					},
+					"germplasmCount": {
+						"type": "integer"
+					}
+				}
+			},
+			"collection": {
+				"properties": {
+					"id": {
+						"type": "long"
+					},
+					"name": {
+						"type": "keyword",
+						"doc_values": true
+					},
+					"type": {
+						"type": "keyword"
+					},
+					"germplasmCount": {
+						"type": "integer"
+					}
+				}
+			},
+			"population": {
+				"properties": {
+					"id": {
+						"type": "long"
+					},
+					"name": {
+						"type": "keyword",
+						"doc_values": true
+					},
+					"type": {
+						"type": "keyword"
+					},
+					"germplasmRef": {
+						"properties": {
+							"pui": {
+								"type": "keyword"
+							},
+							"name": {
+								"type": "keyword"
+							}
+						}
+					},
+					"germplasmCount": {
+						"type": "integer"
+					}
+				}
+			},
+			"studyDbIds": {
+				"type": "keyword"
+			},
+
+			"documentationURL": {
+				"type": "keyword"
+			},
+			"source": {
+				"type": "keyword"
+			},
+
+			"groupId": {
+				"type": "long"
+			},
+			"@type": {
+				"type": "keyword"
+			},
+			"@id": {
+				"type": "keyword"
+			},
+			"schema:includedInDataCatalog": {
+				"type": "keyword"
+			},
+			"schema:identifier": {
+				"type": "keyword"
+			},
+			"schema:name": {
+				"type": "keyword"
+			},
+			"schema:url": {
+				"type": "keyword"
+			}
+		}
+	}
 }
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/location_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/location_mapping.json
index 1955fe94..498fb319 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/location_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/location_mapping.json
@@ -1,56 +1,76 @@
 {
-  "location": {
-    "dynamic": false,
-    "properties": {
-      "locationDbId": {
-        "type": "keyword"
-      },
-      "locationName": {
-        "type": "keyword"
-      },
-      "locationType": {
-        "type": "keyword"
-      },
-      "abbreviation": {
-        "type": "keyword"
-      },
-      "additionalInfo": {
-        "dynamic": "true",
-        "properties": {}
-      },
-      "altitude": {
-        "type": "double"
-      },
-      "countryCode": {
-        "type": "keyword"
-      },
-      "countryName": {
-        "type": "keyword"
-      },
-      "groupId": {
-        "type": "long"
-      },
-      "institutionAdress": {
-        "type": "keyword"
-      },
-      "institutionName": {
-        "type": "keyword"
-      },
-      "latitude": {
-        "type": "double"
-      },
-      "longitude": {
-        "type": "double"
-      },
-      "source": {
-        "type": "keyword"
-      },
-      "speciesGroup": {
-        "type": "long"
-      },
-      "documentationURL": {
-        "type": "keyword"
-      }
-    }
-  }
+	"location": {
+		"dynamic": "strict",
+		"properties": {
+			"locationDbId": {
+				"type": "keyword"
+			},
+			"locationName": {
+				"type": "keyword"
+			},
+			"name": {
+				"type": "keyword"
+			},
+			"locationType": {
+				"type": "keyword"
+			},
+			"abbreviation": {
+				"type": "keyword"
+			},
+			"countryCode": {
+				"type": "keyword"
+			},
+			"countryName": {
+				"type": "keyword"
+			},
+			"institutionName": {
+				"type": "keyword"
+			},
+			"institutionAdress": {
+				"type": "keyword"
+			},
+			"latitude": {
+				"type": "double"
+			},
+			"longitude": {
+				"type": "double"
+			},
+			"altitude": {
+				"type": "double"
+			},
+			"additionalInfo": {
+				"dynamic": "true",
+				"properties": {}
+			},
+
+			"documentationURL": {
+				"type": "keyword"
+			},
+			"source": {
+				"type": "keyword"
+			},
+
+			"groupId": {
+				"type": "long"
+			},
+			"@type": {
+				"type": "keyword"
+			},
+			"@id": {
+				"type": "keyword"
+			},
+			"schema:includedInDataCatalog": {
+				"type": "keyword"
+			},
+			"schema:identifier": {
+				"type": "keyword"
+			},
+			"schema:name": {
+				"type": "keyword"
+			},
+			"schema:url": {
+				"type": "keyword"
+			}
+		}
+	}
 }
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/observationUnit_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/observationUnit_mapping.json
index c7280ebb..ca56d679 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/observationUnit_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/observationUnit_mapping.json
@@ -1,216 +1,239 @@
 {
-  "observationUnit": {
-    "dynamic": false,
-    "properties": {
-      "groupId": {
-        "type": "long"
-      },
-      "speciesGroup": {
-        "type": "integer"
-      },
-      "source": {
-        "type": "keyword"
-      },
-      "observationUnitDbId": {
-        "type": "keyword"
-      },
-      "observationLevel": {
-        "type": "keyword"
-      },
-      "observationLevels": {
-        "type": "keyword"
-      },
-      "observationLevelDetails": {
-        "properties": {
-          "type": {
-            "type": "keyword"
-          },
-          "name": {
-            "type": "keyword"
-          },
-          "value": {
-            "type": "keyword"
-          }
-        }
-      },
-      "plotNumber": {
-        "type": "keyword",
-        "index": false
-      },
-      "plantNumber": {
-        "type": "keyword",
-        "index": false
-      },
-      "blockNumber": {
-        "type": "keyword",
-        "index": false
-      },
-      "replicate": {
-        "type": "keyword",
-        "index": false
-      },
-      "observationUnitName": {
-        "type": "keyword"
-      },
-      "germplasmId": {
-        "type": "long"
-      },
-      "germplasmDbId": {
-        "type": "keyword"
-      },
-      "germplasmName": {
-        "type": "keyword"
-      },
-      "observationUnitXref": {
-        "properties": {
-          "id": {
-            "type": "keyword"
-          },
-          "source": {
-            "type": "keyword"
-          }
-        }
-      },
-      "studyDbId": {
-        "type": "keyword"
-      },
-      "studyName": {
-        "type": "keyword"
-      },
-      "studyLocationDbId": {
-        "type": "keyword"
-      },
-      "studyLocation": {
-        "type": "keyword"
-      },
-      "programDbId": {
-        "type": "keyword"
-      },
-      "programName": {
-        "type": "keyword"
-      },
-      "X": {
-        "type": "keyword"
-      },
-      "Y": {
-        "type": "keyword"
-      },
-      "Xname": {
-        "type": "keyword"
-      },
-      "Yname": {
-        "type": "keyword"
-      },
-      "Xm": {
-        "type": "keyword"
-      },
-      "Ym": {
-        "type": "keyword"
-      },
-      "entryType": {
-        "type": "keyword",
-        "index": false
-      },
-      "entryNumber": {
-        "type": "keyword",
-        "index": false
-      },
-      "treatments": {
-        "properties": {
-          "factor": {
-            "type": "keyword"
-          },
-          "modality": {
-            "type": "keyword"
-          }
-        }
-      },
-      "observations": {
-        "type": "nested",
-        "properties": {
-          "observationDbId": {
-            "type": "keyword"
-          },
-          "observationVariableDbId": {
-            "type": "keyword"
-          },
-          "observationVariableName": {
-            "type": "keyword"
-          },
-          "observationTimeStamp": {
-            "type": "date",
-            "format": "yyyy-MM-dd'T'HH:mm:ss'Z'"
-          },
-          "season": {
-            "type": "keyword"
-          },
-          "collector": {
-            "type": "keyword",
-            "index": false
-          },
-          "value": {
-            "type": "keyword"
-          },
-          "specificName": {
-            "type": "keyword"
-          },
-          "observationVariableId": {
-            "type": "long"
-          },
-          "isDataFile": {
-            "type": "boolean",
-            "index": false
-          },
-          "gdd": {
-            "type": "float"
-          }
-        }
-      },
-      "studyId": {
-        "type": "long"
-      },
-      "trials": {
-        "properties": {
-          "id": {
-            "type": "long"
-          },
-          "name": {
-            "type": "keyword"
-          }
-        }
-      },
-      "accessionNumber": {
-        "type": "keyword"
-      },
-      "taxonId": {
-        "type": "long"
-      },
-      "taxonScientificName": {
-        "type": "keyword"
-      },
-      "germplasmGenus": {
-        "type": "keyword"
-      },
-      "germplasmCollections": {
-        "properties": {
-          "id": {
-            "type": "long"
-          },
-          "name": {
-            "type": "keyword"
-          }
-        }
-      },
-      "germplasmPanels": {
-        "properties": {
-          "id": {
-            "type": "long"
-          },
-          "name": {
-            "type": "keyword"
-          }
-        }
-      }
-    }
-  }
+	"observationUnit": {
+		"dynamic": "strict",
+		"properties": {
+			"observationUnitDbId": {
+				"type": "keyword"
+			},
+			"observationUnitName": {
+				"type": "keyword"
+			},
+			"observationLevel": {
+				"type": "keyword"
+			},
+			"observationLevels": {
+				"type": "keyword"
+			},
+			"observationLevelDetails": {
+				"properties": {
+					"type": {
+						"type": "keyword"
+					},
+					"name": {
+						"type": "keyword"
+					},
+					"value": {
+						"type": "keyword"
+					}
+				}
+			},
+			"plotNumber": {
+				"type": "keyword",
+				"index": false
+			},
+			"plantNumber": {
+				"type": "keyword",
+				"index": false
+			},
+			"blockNumber": {
+				"type": "keyword",
+				"index": false
+			},
+			"replicate": {
+				"type": "keyword",
+				"index": false
+			},
+			"X": {
+				"type": "keyword"
+			},
+			"Y": {
+				"type": "keyword"
+			},
+			"Xname": {
+				"type": "keyword"
+			},
+			"Yname": {
+				"type": "keyword"
+			},
+			"Xm": {
+				"type": "keyword"
+			},
+			"Ym": {
+				"type": "keyword"
+			},
+			"germplasmDbId": {
+				"type": "keyword"
+			},
+			"germplasmId": {
+				"type": "long"
+			},
+			"germplasmPUI": {
+				"type": "long"
+			},
+			"germplasmName": {
+				"type": "keyword"
+			},
+			"observationUnitXref": {
+				"properties": {
+					"id": {
+						"type": "keyword"
+					},
+					"source": {
+						"type": "keyword"
+					}
+				}
+			},
+			"studyDbId": {
+				"type": "keyword"
+			},
+			"studyName": {
+				"type": "keyword"
+			},
+			"studyLocationDbId": {
+				"type": "keyword"
+			},
+			"studyLocation": {
+				"type": "keyword"
+			},
+			"programDbId": {
+				"type": "keyword"
+			},
+			"programName": {
+				"type": "keyword"
+			},
+			"treatments": {
+				"properties": {
+					"factor": {
+						"type": "keyword"
+					},
+					"modality": {
+						"type": "keyword"
+					}
+				}
+			},
+			"observations": {
+				"type": "nested",
+				"properties": {
+					"observationDbId": {
+						"type": "keyword"
+					},
+					"observationVariableDbId": {
+						"type": "keyword"
+					},
+					"observationVariableName": {
+						"type": "keyword"
+					},
+					"observationTimeStamp": {
+						"type": "date",
+						"format": "yyyy-MM-dd'T'HH:mm:ss'Z'"
+					},
+					"season": {
+						"type": "keyword"
+					},
+					"collector": {
+						"type": "keyword",
+						"index": false
+					},
+					"value": {
+						"type": "keyword"
+					},
+					"specificName": {
+						"type": "keyword"
+					},
+					"observationVariableId": {
+						"type": "long"
+					},
+					"isDataFile": {
+						"type": "boolean",
+						"index": false
+					},
+					"gdd": {
+						"type": "float"
+					}
+				}
+			},
+			"entryType": {
+				"type": "keyword",
+				"index": false
+			},
+			"entryNumber": {
+				"type": "keyword",
+				"index": false
+			},
+			"studyId": {
+				"type": "long"
+			},
+			"trials": {
+				"properties": {
+					"id": {
+						"type": "long"
+					},
+					"name": {
+						"type": "keyword"
+					}
+				}
+			},
+			"accessionNumber": {
+				"type": "keyword"
+			},
+			"taxonId": {
+				"type": "long"
+			},
+			"taxonScientificName": {
+				"type": "keyword"
+			},
+			"germplasmGenus": {
+				"type": "keyword"
+			},
+			"germplasmCollections": {
+				"properties": {
+					"id": {
+						"type": "long"
+					},
+					"name": {
+						"type": "keyword"
+					}
+				}
+			},
+			"germplasmPanels": {
+				"properties": {
+					"id": {
+						"type": "long"
+					},
+					"name": {
+						"type": "keyword"
+					}
+				}
+			},
+
+			"documentationURL": {
+				"type": "keyword"
+			},
+			"source": {
+				"type": "keyword"
+			},
+
+			"groupId": {
+				"type": "long"
+			},
+			"@type": {
+				"type": "keyword"
+			},
+			"@id": {
+				"type": "keyword"
+			},
+			"schema:includedInDataCatalog": {
+				"type": "keyword"
+			},
+			"schema:identifier": {
+				"type": "keyword"
+			},
+			"schema:name": {
+				"type": "keyword"
+			},
+			"schema:url": {
+				"type": "keyword"
+			}
+		}
+	}
 }
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/program_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/program_mapping.json
index aef2ae37..ea591f7a 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/program_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/program_mapping.json
@@ -1,6 +1,6 @@
 {
 	"program": {
-	"dynamic": "strict",
+		"dynamic": "strict",
 		"properties": {
 			"programDbId": {
 				"type": "keyword"
@@ -20,18 +20,13 @@
 			"leadPerson": {
 				"type": "keyword"
 			},
-			"source": {
-				"type": "keyword"
-			},
+
 			"studyDbIds": {
 				"type": "keyword"
 			},
 			"trialDbIds": {
 				"type": "keyword"
 			},
-			"documentationURL": {
-				"type": "keyword"
-			},
 			"programURI": {
 				"type": "keyword"
 			},
@@ -41,6 +36,14 @@
 			"trialURIs": {
 				"type": "keyword"
 			},
+
+			"documentationURL": {
+				"type": "keyword"
+			},
+			"source": {
+				"type": "keyword"
+			},
+
 			"groupId": {
 				"type": "long"
 			},
@@ -58,6 +61,9 @@
 			},
 			"schema:name": {
 				"type": "keyword"
+			},
+			"schema:url": {
+				"type": "keyword"
 			}
 		}
 	}
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/settings.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/settings.json
index acad8ff5..db9668c8 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/settings.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/settings.json
@@ -1,42 +1,42 @@
 {
-  "index" : {
-    "max_inner_result_window": 10000
-  },
-  "analysis": {
-    "filter": {
-      "1-20-edgeNGram": {
-        "type": "edgeNGram",
-        "side": "front",
-        "min_gram": 1,
-        "max_gram": 20
-      }
-    },
-    "tokenizer": {
-      "special_tokenizer": {
-        "type": "pattern",
-        "pattern": "\\s|,|-|\\(|\\)|\\[|\\]|\\{|\\}|_"
-      }
-    },
-    "analyzer": {
-      "search_suggester": {
-        "type": "custom",
-        "tokenizer": "special_tokenizer",
-        "filter": [
-          "standard",
-          "lowercase",
-          "asciifolding"
-        ]
-      },
-      "index_suggester": {
-        "type": "custom",
-        "tokenizer": "special_tokenizer",
-        "filter": [
-          "standard",
-          "lowercase",
-          "asciifolding",
-          "1-20-edgeNGram"
-        ]
-      }
-    }
-  }
+	"index" : {
+		"max_inner_result_window": 10000
+	},
+	"analysis": {
+		"filter": {
+			"1-20-edgeNGram": {
+				"type": "edgeNGram",
+				"side": "front",
+				"min_gram": 1,
+				"max_gram": 20
+			}
+		},
+		"tokenizer": {
+			"special_tokenizer": {
+				"type": "pattern",
+				"pattern": "\\s|,|-|\\(|\\)|\\[|\\]|\\{|\\}|_"
+			}
+		},
+		"analyzer": {
+			"search_suggester": {
+				"type": "custom",
+				"tokenizer": "special_tokenizer",
+				"filter": [
+					"standard",
+					"lowercase",
+					"asciifolding"
+				]
+			},
+			"index_suggester": {
+				"type": "custom",
+				"tokenizer": "special_tokenizer",
+				"filter": [
+					"standard",
+					"lowercase",
+					"asciifolding",
+					"1-20-edgeNGram"
+				]
+			}
+		}
+	}
 }
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/study_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/study_mapping.json
index a254ceff..d8e3e07d 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/study_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/study_mapping.json
@@ -1,127 +1,150 @@
 {
-  "study": {
-    "dynamic": false,
-    "properties": {
-      "studyName": {
-        "type": "keyword"
-      },
-      "studyDbId": {
-        "type": "keyword"
-      },
-      "studyType": {
-        "type": "keyword"
-      },
-      "active": {
-        "type": "boolean"
-      },
-      "additionalInfo": {
-        "type": "object",
-        "properties": {}
-      },
-      "contacts": {
-        "properties": {
-          "contactDbId": {
-            "type": "keyword"
-          },
-          "email": {
-            "type": "keyword"
-          },
-          "institutionName": {
-            "type": "keyword"
-          },
-          "name": {
-            "type": "keyword"
-          },
-          "orcid": {
-            "type": "keyword"
-          },
-          "type": {
-            "type": "keyword"
-          }
-        }
-      },
-      "dataLinks": {
-        "properties": {
-          "name": {
-            "type": "keyword"
-          },
-          "type": {
-            "type": "keyword"
-          },
-          "url": {
-            "type": "keyword"
-          }
-        }
-      },
-      "endDate": {
-        "type": "date",
-        "format": "YYYY-MM-dd"
-      },
-      "germplasmDbIds": {
-        "type": "keyword"
-      },
-      "groupId": {
-        "type": "long"
-      },
-      "lastUpdate": {
-        "properties": {
-          "version": {
-            "type": "keyword"
-          },
-          "timestamp": {
-            "type": "date",
-            "format": "yyyy-MM-dd||yyyy-MM-dd'T'HH:mm:ss'Z'"
-          }
-        }
-      },
-      "locationDbId": {
-        "type": "keyword"
-      },
-      "locationName": {
-        "type": "keyword"
-      },
-      "location": {
-        "dynamic": "true",
-        "properties": {
-          "locationDbId": {
-            "type": "keyword"
-          }
-        }
-      },
-      "observationVariableDbIds": {
-        "type": "keyword"
-      },
-      "programDbId": {
-        "type": "keyword"
-      },
-      "programName": {
-        "type": "keyword"
-      },
-      "seasons": {
-        "type": "keyword"
-      },
-      "source": {
-        "type": "keyword"
-      },
-      "speciesGroup": {
-        "type": "integer"
-      },
-      "startDate": {
-        "type": "date",
-        "format": "YYYY-MM-dd"
-      },
-      "trialName": {
-        "type": "keyword"
-      },
-      "trialDbId": {
-        "type": "keyword"
-      },
-      "trialDbIds": {
-        "type": "keyword"
-      },
-      "documentationURL": {
-        "type": "keyword"
-      }
-    }
-  }
+	"study": {
+		"dynamic": "strict",
+		"properties": {
+			"studyDbId": {
+				"type": "keyword"
+			},
+			"studyName": {
+				"type": "keyword"
+			},
+			"name": {
+				"type": "keyword"
+			},
+			"startDate": {
+				"type": "date",
+				"format": "YYYY-MM-dd"
+			},
+			"endDate": {
+				"type": "date",
+				"format": "YYYY-MM-dd"
+			},
+			"active": {
+				"type": "boolean"
+			},
+			"studyType": {
+				"type": "keyword"
+			},
+			
+			"lastUpdate": {
+				"properties": {
+					"version": {
+						"type": "keyword"
+					},
+					"timestamp": {
+						"type": "date",
+						"format": "yyyy-MM-dd||yyyy-MM-dd'T'HH:mm:ss'Z'"
+					}
+				}
+			},
+			"trialDbId": {
+				"type": "keyword"
+			},
+			"trialName": {
+				"type": "keyword"
+			},
+			"trialDbIds": {
+				"type": "keyword"
+			},
+			"programDbId": {
+				"type": "keyword"
+			},
+			"programName": {
+				"type": "keyword"
+			},
+			
+			"seasons": {
+				"type": "keyword"
+			},
+			"locationDbId": {
+				"type": "keyword"
+			},
+			"locationName": {
+				"type": "keyword"
+			},
+			"location": {
+				"dynamic": "true",
+				"properties": {
+					"locationDbId": {
+						"type": "keyword"
+					}
+				}
+			},
+			"dataLinks": {
+				"properties": {
+					"name": {
+						"type": "keyword"
+					},
+					"type": {
+						"type": "keyword"
+					},
+					"url": {
+						"type": "keyword"
+					}
+				}
+			},
+			"contacts": {
+				"properties": {
+					"contactDbId": {
+						"type": "keyword"
+					},
+					"name": {
+						"type": "keyword"
+					},
+					"institutionName": {
+						"type": "keyword"
+					},
+					"email": {
+						"type": "keyword"
+					},
+					"type": {
+						"type": "keyword"
+					},
+					"orcid": {
+						"type": "keyword"
+					}
+				}
+			},
+			"observationVariableDbIds": {
+				"type": "keyword"
+			},
+			"germplasmDbIds": {
+				"type": "keyword"
+			},
+			"additionalInfo": {
+				"dynamic": "true",
+				"type": "object",
+				"properties": {}
+			},
+
+			"documentationURL": {
+				"type": "keyword"
+			},
+			"source": {
+				"type": "keyword"
+			},
+
+			"groupId": {
+				"type": "long"
+			},
+			"@type": {
+				"type": "keyword"
+			},
+			"@id": {
+				"type": "keyword"
+			},
+			"schema:includedInDataCatalog": {
+				"type": "keyword"
+			},
+			"schema:identifier": {
+				"type": "keyword"
+			},
+			"schema:name": {
+				"type": "keyword"
+			},
+			"schema:url": {
+				"type": "keyword"
+			}
+		}
+	}
 }
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/transplant_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/transplant_mapping.json
index f470dc9d..5aec114c 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/transplant_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/transplant_mapping.json
@@ -1,13 +1,13 @@
 {
-  "transplant": {
-    "dynamic": "true",
-    "properties": {
-      "entry_type": {
-        "type": "keyword"
-      },
-      "linkedRessourcesID": {
-        "type": "keyword"
-      }
-    }
-  }
+	"transplant": {
+		"dynamic": "true",
+		"properties": {
+			"entry_type": {
+				"type": "keyword"
+			},
+			"linkedRessourcesID": {
+				"type": "keyword"
+			}
+		}
+	}
 }
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/trial_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/trial_mapping.json
index fcc2adf3..4ce25a38 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/trial_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/trial_mapping.json
@@ -1,94 +1,156 @@
 {
-  "trial": {
-    "dynamic": false,
-    "properties": {
-      "active": {
-        "type": "boolean"
-      },
-      "additionalInfo": {
-        "type": "object",
-        "properties": {}
-      },
-      "contacts": {
-        "properties": {
-          "contactDbId": {
-            "type": "keyword"
-          },
-          "email": {
-            "type": "keyword"
-          },
-          "institutionName": {
-            "type": "keyword"
-          },
-          "name": {
-            "type": "keyword"
-          },
-          "orcid": {
-            "type": "keyword"
-          },
-          "type": {
-            "type": "keyword"
-          }
-        }
-      },
-      "datasetAuthorship": {
-        "properties": {
-          "license": {
-            "type": "keyword"
-          },
-          "datasetPUI": {
-            "type": "keyword"
-          }
-        }
-      },
-      "docId": {
-        "type": "keyword"
-      },
-      "endDate": {
-        "type": "date",
-        "format": "YYYY-MM-dd"
-      },
-      "groupId": {
-        "type": "long"
-      },
-      "source": {
-        "type": "keyword"
-      },
-      "speciesGroup": {
-        "type": "integer"
-      },
-      "startDate": {
-        "type": "date",
-        "format": "YYYY-MM-dd"
-      },
-      "studies": {
-        "properties": {
-          "locationName": {
-            "type": "keyword"
-          },
-          "locationDbId": {
-            "type": "keyword"
-          },
-          "studyDbId": {
-            "type": "keyword"
-          },
-          "studyName": {
-            "type": "keyword"
-          }
-        }
-      },
-      "trialDbId": {
-        "type": "keyword"
-      },
-      "trialName": {
-        "type": "keyword"
-      },
-      "trialType": {
-        "type": "keyword"
-      },
-      "documentationURL": {
-        "type": "keyword"
-      }
-    }
-  }
+	"trial": {
+		"dynamic": "strict",
+		"properties": {
+			"docId": {
+				"type": "keyword"
+			},
+			"trialDbId": {
+				"type": "keyword"
+			},
+			"trialPUI": {
+				"type": "keyword"
+			},
+			"trialName": {
+				"type": "keyword"
+			},
+			"trialType": {
+				"type": "keyword"
+			},
+			"startDate": {
+				"type": "date",
+				"format": "YYYY-MM-dd"
+			},
+			"endDate": {
+				"type": "date",
+				"format": "YYYY-MM-dd"
+			},
+			"active": {
+				"type": "boolean"
+			},
+			"datasetAuthorship": {
+				"properties": {
+					"license": {
+						"type": "keyword"
+					},
+					"datasetPUI": {
+						"type": "keyword"
+					}
+				}
+			},
+			"datasetAuthorships": {
+				"properties": {
+					"license": {
+						"type": "keyword"
+					},
+					"datasetPUI": {
+						"type": "keyword"
+					}
+				}
+			},
+			"contacts": {
+				"properties": {
+					"contactDbId": {
+						"type": "keyword"
+					},
+					"name": {
+						"type": "keyword"
+					},
+					"institutionName": {
+						"type": "keyword"
+					},
+					"email": {
+						"type": "keyword"
+					},
+					"type": {
+						"type": "keyword"
+					},
+					"contactURI": {
+						"type": "keyword"
+					},
+					"orcid": {
+						"type": "keyword"
+					}
+				}
+			},
+			"studies": {
+				"properties": {
+					"studyDbId": {
+						"type": "keyword"
+					},
+					"studyName": {
+						"type": "keyword"
+					},
+					"name": {
+						"type": "keyword"
+					},
+					"locationDbId": {
+						"type": "keyword"
+					},
+					"locationName": {
+						"type": "keyword"
+					},
+					"studyURI": {
+						"type": "keyword"
+					},
+					"locationURI": {
+						"type": "keyword"
+					}
+				}
+			},
+			"commonCropName": {
+				"type": "keyword"
+			},
+			"additionalInfo": {
+				"dynamic": "true",
+				"type": "object",
+				"properties": {}
+			},
+			"programDbId": {
+				"type": "keyword"
+			},
+			"programName": {
+				"type": "keyword"
+			},
+			"studyDbIds": {
+				"type": "keyword"
+			},
+			"contactDbIds": {
+				"type": "keyword"
+			},
+
+			"trialURI": {
+				"type": "keyword"
+			},
+
+			"documentationURL": {
+				"type": "keyword"
+			},
+			"source": {
+				"type": "keyword"
+			},
+
+			"groupId": {
+				"type": "long"
+			},
+			"@type": {
+				"type": "keyword"
+			},
+			"@id": {
+				"type": "keyword"
+			},
+			"schema:includedInDataCatalog": {
+				"type": "keyword"
+			},
+			"schema:identifier": {
+				"type": "keyword"
+			},
+			"schema:name": {
+				"type": "keyword"
+			},
+			"schema:url": {
+				"type": "keyword"
+			}
+		}
+	}
 }
-- 
GitLab


From 2190f7acf9640235086b3877a1e183654c90493d Mon Sep 17 00:00:00 2001
From: Celia Michotey <celia.michotey@inra.fr>
Date: Wed, 23 Oct 2019 14:28:10 +0200
Subject: [PATCH 04/11] Finish indexation script and update mappings.

---
 .gitignore                                    |   3 +
 .../es/setup/index/datadiscovery_mapping.json |  15 +-
 .../index/germplasmAttribute_mapping.json     |  24 +-
 .../index/germplasmPedigree_mapping.json      |  28 +-
 .../setup/index/germplasmProgeny_mapping.json |  16 +-
 .../es/setup/index/germplasm_mapping.json     | 125 +++++----
 .../es/setup/index/location_mapping.json      |  33 ++-
 .../setup/index/observationUnit_mapping.json  | 181 ++++++------
 .../es/setup/index/program_mapping.json       |  30 +-
 .../es/setup/index/study_mapping.json         | 195 ++++++++++---
 .../es/setup/index/trial_mapping.json         | 260 +++++++++++++++---
 scripts/harvest.sh                            |  18 +-
 12 files changed, 664 insertions(+), 264 deletions(-)

diff --git a/.gitignore b/.gitignore
index fc67b540..c456a808 100644
--- a/.gitignore
+++ b/.gitignore
@@ -91,6 +91,9 @@ local.properties
 # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
 # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
 
+*.iml
+*.ipr
+
 # User-specific stuff
 .idea/*
 .idea/**/workspace.xml
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/datadiscovery_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/datadiscovery_mapping.json
index 331335a1..076ea76a 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/datadiscovery_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/datadiscovery_mapping.json
@@ -1,6 +1,6 @@
 {
 	"datadiscovery": {
-		"dynamic": "strict",
+		"dynamic": "false",
 		"_source": {
 			"includes": ["@id", "@type", "schema:*", "groupId"]
 		},
@@ -30,6 +30,19 @@
 				"type": "keyword"
 			},
 
+			"germplasmURI": {
+				"type": "keyword"
+			},
+			"germplasmDbId": {
+				"type": "keyword"
+			},
+			"studyURIs": {
+				"type": "keyword"
+			},
+			"studyDbIds": {
+				"type": "keyword"
+			},
+
 			"germplasm": {
 				"type": "object",
 				"properties": {
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmAttribute_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmAttribute_mapping.json
index 6a7c900b..d0133c0b 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmAttribute_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmAttribute_mapping.json
@@ -2,38 +2,46 @@
 	"germplasmAttribute": {
 		"dynamic": "strict",
 		"properties": {
+			"germplasmAttributeURI": {
+				"type": "keyword"
+			},
+			"germplasmAttributeDbId": {
+				"type": "keyword"
+			},
+			"germplasmURI": {
+				"type": "keyword"
+			},
 			"germplasmDbId": {
 				"type": "keyword"
 			},
 			"data": {
 				"type": "nested",
 				"properties": {
-					"attributeDbId": {
+					"attributeURI": {
 						"type": "keyword"
 					},
-					"attributeName": {
+					"attributeDbId": {
 						"type": "keyword"
 					},
 					"attributeCode": {
 						"type": "keyword"
 					},
-					"value": {
+					"attributeName": {
 						"type": "keyword"
 					},
 					"determinedDate": {
 						"type": "date",
 						"format": "YYYY-MM-dd"
+					},
+					"value": {
+						"type": "keyword"
 					}
 				}
 			},
 
-			"documentationURL": {
-				"type": "keyword"
-			},
 			"source": {
 				"type": "keyword"
 			},
-
 			"groupId": {
 				"type": "long"
 			},
@@ -57,4 +65,4 @@
 			}
 		}
 	}
-}
\ No newline at end of file
+}
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmPedigree_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmPedigree_mapping.json
index ad7070d9..79986a17 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmPedigree_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmPedigree_mapping.json
@@ -2,13 +2,19 @@
 	"germplasmPedigree": {
 		"dynamic": "strict",
 		"properties": {
-			"germplasmDbId": {
+			"germplasmPedigreeURI": {
 				"type": "keyword"
 			},
-			"defaultDisplayName": {
+			"germplasmPedigreeDbId": {
 				"type": "keyword"
 			},
-			"pedigree": {
+			"germplasmURI": {
+				"type": "keyword"
+			},
+			"germplasmDbId": {
+				"type": "keyword"
+			},
+			"defaultDisplayName": {
 				"type": "keyword"
 			},
 			"crossingPlan": {
@@ -20,6 +26,9 @@
 			"familyCode": {
 				"type": "keyword"
 			},
+			"parent1URI": {
+				"type": "keyword"
+			},
 			"parent1DbId": {
 				"type": "keyword"
 			},
@@ -29,6 +38,9 @@
 			"parent1Type": {
 				"type": "keyword"
 			},
+			"parent2URI": {
+				"type": "keyword"
+			},
 			"parent2DbId": {
 				"type": "keyword"
 			},
@@ -38,8 +50,14 @@
 			"parent2Type": {
 				"type": "keyword"
 			},
+			"pedigree": {
+				"type": "keyword"
+			},
 			"siblings": {
 				"properties": {
+					"germplasmURI": {
+						"type": "keyword"
+					},
 					"germplasmDbId": {
 						"type": "keyword"
 					},
@@ -49,13 +67,9 @@
 				}
 			},
 
-			"documentationURL": {
-				"type": "keyword"
-			},
 			"source": {
 				"type": "keyword"
 			},
-
 			"groupId": {
 				"type": "long"
 			},
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmProgeny_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmProgeny_mapping.json
index cdfe1cc4..58eb7a9b 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmProgeny_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmProgeny_mapping.json
@@ -2,6 +2,15 @@
 	"germplasmProgeny": {
 		"dynamic": "strict",
 		"properties": {
+			"germplasmProgenyURI": {
+				"type": "keyword"
+			},
+			"germplasmProgenyDbId": {
+				"type": "keyword"
+			},
+			"germplasmURI": {
+				"type": "keyword"
+			},
 			"germplasmDbId": {
 				"type": "keyword"
 			},
@@ -10,6 +19,9 @@
 			},
 			"progeny": {
 				"properties": {
+					"germplasmURI": {
+						"type": "keyword"
+					},
 					"germplasmDbId": {
 						"type": "keyword"
 					},
@@ -22,13 +34,9 @@
 				}
 			},
 
-			"documentationURL": {
-				"type": "keyword"
-			},
 			"source": {
 				"type": "keyword"
 			},
-
 			"groupId": {
 				"type": "long"
 			},
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasm_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasm_mapping.json
index 2c5cd2b5..3298d98a 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasm_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasm_mapping.json
@@ -2,76 +2,43 @@
 	"germplasm": {
 		"dynamic": "strict",
 		"properties": {
-			"germplasmDbId": {
+			"germplasmURI": {
 				"type": "keyword"
 			},
-			"defaultDisplayName": {
+			"germplasmDbId": {
 				"type": "keyword"
 			},
-			"accessionNumber": {
-				"type": "keyword",
-				"doc_values": true
-			},
-			"germplasmName": {
-				"type": "keyword",
-				"doc_values": true
-			},
 			"germplasmPUI": {
 				"type": "keyword"
 			},
-			"pedigree": {
-				"type": "keyword"
-			},
-			"seedSource": {
-				"type": "keyword"
-			},
-			"synonyms": {
+			"germplasmName": {
 				"type": "keyword",
 				"doc_values": true
 			},
-			"commonCropName": {
+			"accessionNumber": {
 				"type": "keyword",
 				"doc_values": true
 			},
-			"instituteCode": {
-				"type": "keyword"
-			},
-			"instituteName": {
+			"acquisitionDate": {
 				"type": "keyword"
 			},
 			"biologicalStatusOfAccessionCode": {
 				"type": "keyword"
 			},
-			"countryOfOriginCode": {
+			"breedingMethodDbId": {
 				"type": "keyword"
 			},
-			"typeOfGermplasmStorageCode": {
-				"type": "keyword"
-			},
-			"taxonIds": {
-				"properties": {
-					"sourceName": {
-						"type": "keyword"
-					},
-					"taxonId": {
-						"type": "keyword"
-					}
-				}
-			},
-			"genus": {
+			"commonCropName": {
 				"type": "keyword",
 				"doc_values": true
 			},
-			"species": {
-				"type": "keyword"
-			},
-			"speciesAuthority": {
+			"countryOfOriginCode": {
 				"type": "keyword"
 			},
-			"subtaxa": {
+			"defaultDisplayName": {
 				"type": "keyword"
 			},
-			"subtaxaAuthority": {
+			"documentationURL": {
 				"type": "keyword"
 			},
 			"donors": {
@@ -82,6 +49,9 @@
 					"donorGermplasmPUI": {
 						"type": "keyword"
 					},
+					"germplasmPUI": {
+						"type": "keyword"
+					},
 					"donorAccessionNumber": {
 						"type": "keyword"
 					},
@@ -118,17 +88,70 @@
 					}
 				}
 			},
-			"acquisitionDate": {
+			"genus": {
+				"type": "keyword",
+				"doc_values": true
+			},
+			"germplasmGenus": {
+				"type": "keyword",
+				"doc_values": true
+			},
+			"species": {
 				"type": "keyword"
 			},
+			"germplasmSpecies": {
+				"type": "keyword",
+				"doc_values": true
+			},
 			"genusSpecies": {
 				"type": "keyword",
 				"doc_values": true
 			},
+			"speciesAuthority": {
+				"type": "keyword"
+			},
+			"subtaxa": {
+				"type": "keyword"
+			},
+			"subTaxa": {
+				"type": "keyword"
+			},
 			"genusSpeciesSubtaxa": {
 				"type": "keyword",
 				"doc_values": true
 			},
+			"subtaxaAuthority": {
+				"type": "keyword"
+			},
+			"instituteCode": {
+				"type": "keyword"
+			},
+			"instituteName": {
+				"type": "keyword"
+			},			
+			"pedigree": {
+				"type": "keyword"
+			},
+			"seedSource": {
+				"type": "keyword"
+			},
+			"SeedSource": {
+				"type": "keyword"
+			},
+			"synonyms": {
+				"type": "keyword",
+				"doc_values": true
+			},
+			"taxonIds": {
+				"properties": {
+					"sourceName": {
+						"type": "keyword"
+					},
+					"taxonId": {
+						"type": "keyword"
+					}
+				}
+			},
 			"taxonSynonyms": {
 				"type": "keyword",
 				"doc_values": true
@@ -140,6 +163,9 @@
 			"taxonComment": {
 				"type": "keyword"
 			},
+			"typeOfGermplasmStorageCode": {
+				"type": "keyword"
+			},
 			"geneticNature": {
 				"type": "keyword"
 			},
@@ -531,17 +557,22 @@
 					}
 				}
 			},
+			"studyURIs": {
+				"type": "keyword"
+			},
 			"studyDbIds": {
 				"type": "keyword"
 			},
-
-			"documentationURL": {
+			"studyURI": {
 				"type": "keyword"
 			},
-			"source": {
+			"studyDbId": {
 				"type": "keyword"
 			},
 
+			"source": {
+				"type": "keyword"
+			},	
 			"groupId": {
 				"type": "long"
 			},
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/location_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/location_mapping.json
index 498fb319..8ab41d2a 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/location_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/location_mapping.json
@@ -2,6 +2,9 @@
 	"location": {
 		"dynamic": "strict",
 		"properties": {
+			"locationURI": {
+				"type": "keyword"
+			},
 			"locationDbId": {
 				"type": "keyword"
 			},
@@ -11,10 +14,13 @@
 			"name": {
 				"type": "keyword"
 			},
-			"locationType": {
+			"abbreviation": {
 				"type": "keyword"
 			},
-			"abbreviation": {
+			"abreviation": {
+				"type": "keyword"
+			},
+			"locationType": {
 				"type": "keyword"
 			},
 			"countryCode": {
@@ -23,19 +29,25 @@
 			"countryName": {
 				"type": "keyword"
 			},
-			"institutionName": {
+			"documentationURL": {
+				"type": "keyword"
+			},
+			"instituteName": {
 				"type": "keyword"
 			},
-			"institutionAdress": {
+			"instituteAddress": {
 				"type": "keyword"
 			},
-			"latitude": {
+			"instituteAdress": {
+				"type": "keyword"
+			},
+			"altitude": {
 				"type": "double"
 			},
-			"longitude": {
+			"latitude": {
 				"type": "double"
 			},
-			"altitude": {
+			"longitude": {
 				"type": "double"
 			},
 			"additionalInfo": {
@@ -43,13 +55,16 @@
 				"properties": {}
 			},
 
-			"documentationURL": {
+			"studyDbIds": {
 				"type": "keyword"
 			},
-			"source": {
+			"studyURIs": {
 				"type": "keyword"
 			},
 
+			"source": {
+				"type": "keyword"
+			},
 			"groupId": {
 				"type": "long"
 			},
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/observationUnit_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/observationUnit_mapping.json
index ca56d679..5bce2cd4 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/observationUnit_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/observationUnit_mapping.json
@@ -2,111 +2,85 @@
 	"observationUnit": {
 		"dynamic": "strict",
 		"properties": {
+			"observationUnitURI": {
+				"type": "keyword"
+			},
 			"observationUnitDbId": {
 				"type": "keyword"
 			},
 			"observationUnitName": {
 				"type": "keyword"
 			},
-			"observationLevel": {
+			"X": {
 				"type": "keyword"
 			},
-			"observationLevels": {
+			"Y": {
 				"type": "keyword"
 			},
-			"observationLevelDetails": {
-				"properties": {
-					"type": {
-						"type": "keyword"
-					},
-					"name": {
-						"type": "keyword"
-					},
-					"value": {
-						"type": "keyword"
-					}
-				}
+			"Xname": {
+				"type": "keyword"
 			},
-			"plotNumber": {
-				"type": "keyword",
-				"index": false
+			"Yname": {
+				"type": "keyword"
 			},
-			"plantNumber": {
-				"type": "keyword",
-				"index": false
+			"Xm": {
+				"type": "keyword"
+			},
+			"Ym": {
+				"type": "keyword"
 			},
 			"blockNumber": {
 				"type": "keyword",
 				"index": false
 			},
-			"replicate": {
+			"entryNumber": {
 				"type": "keyword",
 				"index": false
 			},
-			"X": {
-				"type": "keyword"
+			"entryType": {
+				"type": "keyword",
+				"index": false
 			},
-			"Y": {
+			"germplasmURI": {
 				"type": "keyword"
 			},
-			"Xname": {
+			"germplasmDbId": {
 				"type": "keyword"
 			},
-			"Yname": {
+			"germplasmPUI": {
 				"type": "keyword"
 			},
-			"Xm": {
+			"germplasmName": {
 				"type": "keyword"
 			},
-			"Ym": {
+			"accessionNumber": {
 				"type": "keyword"
 			},
-			"germplasmDbId": {
+			"observationLevel": {
 				"type": "keyword"
 			},
-			"germplasmId": {
-				"type": "long"
-			},
-			"germplasmPUI": {
-				"type": "long"
-			},
-			"germplasmName": {
+			"observationLevels": {
 				"type": "keyword"
 			},
-			"observationUnitXref": {
+			"observationLevelDetails": {
 				"properties": {
-					"id": {
+					"type": {
 						"type": "keyword"
 					},
-					"source": {
+					"name": {
+						"type": "keyword"
+					},
+					"value": {
 						"type": "keyword"
 					}
 				}
 			},
-			"studyDbId": {
-				"type": "keyword"
-			},
-			"studyName": {
-				"type": "keyword"
-			},
-			"studyLocationDbId": {
-				"type": "keyword"
-			},
-			"studyLocation": {
-				"type": "keyword"
-			},
-			"programDbId": {
-				"type": "keyword"
-			},
-			"programName": {
-				"type": "keyword"
-			},
-			"treatments": {
+			"observationUnitXref": {
 				"properties": {
-					"factor": {
+					"id": {
 						"type": "keyword"
 					},
-					"modality": {
+					"source": {
 						"type": "keyword"
 					}
 				}
@@ -114,54 +88,95 @@
 			"observations": {
 				"type": "nested",
 				"properties": {
-					"observationDbId": {
+					"observationURI": {
 						"type": "keyword"
 					},
-					"observationVariableDbId": {
+					"observationDbId": {
 						"type": "keyword"
 					},
-					"observationVariableName": {
-						"type": "keyword"
+					"collector": {
+						"type": "keyword",
+						"index": false
 					},
 					"observationTimeStamp": {
 						"type": "date",
 						"format": "yyyy-MM-dd'T'HH:mm:ss'Z'"
 					},
-					"season": {
+					"gdd": {
+						"type": "float"
+					},
+					"observationVariableURI": {
 						"type": "keyword"
 					},
-					"collector": {
-						"type": "keyword",
-						"index": false
+					"observationVariableDbId": {
+						"type": "keyword"
 					},
-					"value": {
+					"observationVariableName": {
 						"type": "keyword"
 					},
 					"specificName": {
 						"type": "keyword"
 					},
-					"observationVariableId": {
-						"type": "long"
+					"season": {
+						"type": "keyword"
+					},
+					"value": {
+						"type": "keyword"
 					},
 					"isDataFile": {
 						"type": "boolean",
 						"index": false
-					},
-					"gdd": {
-						"type": "float"
 					}
 				}
 			},
-			"entryType": {
+			"plantNumber": {
 				"type": "keyword",
 				"index": false
 			},
-			"entryNumber": {
+			"plotNumber": {
 				"type": "keyword",
 				"index": false
 			},
-			"studyId": {
-				"type": "long"
+			"programURI": {
+				"type": "keyword"
+			},
+			"programDbId": {
+				"type": "keyword"
+			},
+			"programName": {
+				"type": "keyword"
+			},
+			"replicate": {
+				"type": "keyword",
+				"index": false
+			},
+			"studyURI": {
+				"type": "keyword"
+			},
+			"studyDbId": {
+				"type": "keyword"
+			},
+			"studyName": {
+				"type": "keyword"
+			},
+			"studyLocationURI": {
+				"type": "keyword"
+			},
+			"studyLocationDbId": {
+				"type": "keyword"
+			},
+			"studyLocation": {
+				"type": "keyword"
+			},
+			"treatments": {
+				"properties": {
+					"factor": {
+						"type": "keyword"
+					},
+					"modality": {
+						"type": "keyword"
+					}
+				}
 			},
 			"trials": {
 				"properties": {
@@ -173,12 +188,6 @@
 					}
 				}
 			},
-			"accessionNumber": {
-				"type": "keyword"
-			},
-			"taxonId": {
-				"type": "long"
-			},
 			"taxonScientificName": {
 				"type": "keyword"
 			},
@@ -206,13 +215,9 @@
 				}
 			},
 
-			"documentationURL": {
-				"type": "keyword"
-			},
 			"source": {
 				"type": "keyword"
 			},
-
 			"groupId": {
 				"type": "long"
 			},
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/program_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/program_mapping.json
index ea591f7a..abd710be 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/program_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/program_mapping.json
@@ -2,48 +2,56 @@
 	"program": {
 		"dynamic": "strict",
 		"properties": {
-			"programDbId": {
+			"programURI": {
 				"type": "keyword"
 			},
-			"name": {
+			"programDbId": {
 				"type": "keyword"
 			},
 			"programName": {
 				"type": "keyword"
 			},
+			"name": {
+				"type": "keyword"
+			},
 			"abbreviation": {
 				"type": "keyword"
 			},
-			"objective": {
+			"commonCropName": {
+				"type": "keyword"
+			},
+			"documentationURL": {
 				"type": "keyword"
 			},
 			"leadPerson": {
 				"type": "keyword"
 			},
-
-			"studyDbIds": {
+			"leadPersonDbId": {
 				"type": "keyword"
 			},
-			"trialDbIds": {
+			"leadPersonName": {
 				"type": "keyword"
 			},
-			"programURI": {
+			"objective": {
 				"type": "keyword"
 			},
-			"studyURIs": {
+
+			"trialDbIds": {
 				"type": "keyword"
 			},
 			"trialURIs": {
 				"type": "keyword"
 			},
-
-			"documentationURL": {
+			"studyDbIds": {
 				"type": "keyword"
 			},
-			"source": {
+			"studyURIs": {
 				"type": "keyword"
 			},
 
+			"source": {
+				"type": "keyword"
+			},
 			"groupId": {
 				"type": "long"
 			},
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/study_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/study_mapping.json
index d8e3e07d..d1f7286d 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/study_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/study_mapping.json
@@ -2,6 +2,9 @@
 	"study": {
 		"dynamic": "strict",
 		"properties": {
+			"studyURI": {
+				"type": "keyword"
+			},
 			"studyDbId": {
 				"type": "keyword"
 			},
@@ -11,6 +14,65 @@
 			"name": {
 				"type": "keyword"
 			},
+			"active": {
+				"type": "boolean"
+			},
+			"commonCropName": {
+				"type": "keyword"
+			},
+			"organism": {
+				"type": "keyword"
+			},
+			"contactURIs": {
+				"type": "keyword"
+			},
+			"contactDbIds": {
+				"type": "keyword"
+			},
+			"contacts": {
+				"properties": {
+					"contactURI": {
+						"type": "keyword"
+					},
+					"contactDbId": {
+						"type": "keyword"
+					},
+					"name": {
+						"type": "keyword"
+					},
+					"instituteName": {
+						"type": "keyword"
+					},
+					"email": {
+						"type": "keyword"
+					},
+					"type": {
+						"type": "keyword"
+					},
+					"orcid": {
+						"type": "keyword"
+					}
+				}
+			},
+			"dataLinks": {
+				"properties": {
+					"dataLinkName": {
+						"type": "keyword"
+					},
+					"name": {
+						"type": "keyword"
+					},
+					"type": {
+						"type": "keyword"
+					},
+					"url": {
+						"type": "keyword"
+					}
+				}
+			},
+			"documentationURL": {
+				"type": "keyword"
+			},
 			"startDate": {
 				"type": "date",
 				"format": "YYYY-MM-dd"
@@ -19,13 +81,9 @@
 				"type": "date",
 				"format": "YYYY-MM-dd"
 			},
-			"active": {
-				"type": "boolean"
-			},
-			"studyType": {
+			"year": {
 				"type": "keyword"
 			},
-			
 			"lastUpdate": {
 				"properties": {
 					"version": {
@@ -37,23 +95,16 @@
 					}
 				}
 			},
-			"trialDbId": {
-				"type": "keyword"
-			},
-			"trialName": {
-				"type": "keyword"
-			},
-			"trialDbIds": {
+			"license": {
 				"type": "keyword"
 			},
-			"programDbId": {
+			"locationURIs": {
 				"type": "keyword"
 			},
-			"programName": {
+			"locationDbIds": {
 				"type": "keyword"
 			},
-			
-			"seasons": {
+			"locationURI": {
 				"type": "keyword"
 			},
 			"locationDbId": {
@@ -63,67 +114,131 @@
 				"type": "keyword"
 			},
 			"location": {
-				"dynamic": "true",
 				"properties": {
+					"locationURI": {
+						"type": "keyword"
+					},
 					"locationDbId": {
 						"type": "keyword"
-					}
-				}
-			},
-			"dataLinks": {
-				"properties": {
+					},
+					"locationName": {
+						"type": "keyword"
+					},
 					"name": {
 						"type": "keyword"
 					},
-					"type": {
+					"abbreviation": {
 						"type": "keyword"
 					},
-					"url": {
+					"abreviation": {
 						"type": "keyword"
-					}
-				}
-			},
-			"contacts": {
-				"properties": {
-					"contactDbId": {
+					},
+					"locationType": {
 						"type": "keyword"
 					},
-					"name": {
+					"countryCode": {
 						"type": "keyword"
 					},
-					"institutionName": {
+					"countryName": {
 						"type": "keyword"
 					},
-					"email": {
+					"documentationURL": {
 						"type": "keyword"
 					},
-					"type": {
+					"instituteName": {
 						"type": "keyword"
 					},
-					"orcid": {
+					"instituteAddress": {
 						"type": "keyword"
+					},
+					"instituteAdress": {
+						"type": "keyword"
+					},
+					"altitude": {
+						"type": "double"
+					},
+					"latitude": {
+						"type": "double"
+					},
+					"longitude": {
+						"type": "double"
+					},
+					"additionalInfo": {
+						"dynamic": "true",
+						"type": "object",
+						"properties": {}
 					}
 				}
 			},
-			"observationVariableDbIds": {
+			"programURIs": {
+				"type": "keyword"
+			},
+			"programDbIds": {
+				"type": "keyword"
+			},
+			"programURI": {
+				"type": "keyword"
+			},
+			"programDbId": {
+				"type": "keyword"
+			},
+			"programName": {
+				"type": "keyword"
+			},
+			"seasons": {
+				"type": "keyword"
+			},
+			"studyDescription": {
+				"type": "keyword"
+			},
+			"studyTypeURI": {
+				"type": "keyword"
+			},
+			"studyTypeDbId": {
+				"type": "keyword"
+			},
+			"studyType": {
+				"type": "keyword"
+			},
+			"studyTypeName": {
+				"type": "keyword"
+			},
+			"trialURIs": {
+				"type": "keyword"
+			},
+			"trialDbIds": {
+				"type": "keyword"
+			},
+			"trialURI": {
+				"type": "keyword"
+			},
+			"trialDbId": {
+				"type": "keyword"
+			},
+			"trialName": {
+				"type": "keyword"
+			},
+			"germplasmURIs": {
 				"type": "keyword"
 			},
 			"germplasmDbIds": {
 				"type": "keyword"
 			},
+			"observationVariableURIs": {
+				"type": "keyword"
+			},
+			"observationVariableDbIds": {
+				"type": "keyword"
+			},
 			"additionalInfo": {
 				"dynamic": "true",
 				"type": "object",
 				"properties": {}
 			},
 
-			"documentationURL": {
-				"type": "keyword"
-			},
 			"source": {
 				"type": "keyword"
 			},
-
 			"groupId": {
 				"type": "long"
 			},
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/trial_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/trial_mapping.json
index 4ce25a38..4bde6c12 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/trial_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/trial_mapping.json
@@ -2,21 +2,30 @@
 	"trial": {
 		"dynamic": "strict",
 		"properties": {
-			"docId": {
+			"trialURI": {
 				"type": "keyword"
 			},
 			"trialDbId": {
 				"type": "keyword"
 			},
-			"trialPUI": {
+			"trialName": {
 				"type": "keyword"
 			},
-			"trialName": {
+			"trialPUI": {
 				"type": "keyword"
 			},
 			"trialType": {
 				"type": "keyword"
 			},
+			"active": {
+				"type": "boolean"
+			},
+			"commonCropName": {
+				"type": "keyword"
+			},
+			"documentationURL": {
+				"type": "keyword"
+			},
 			"startDate": {
 				"type": "date",
 				"format": "YYYY-MM-dd"
@@ -25,9 +34,179 @@
 				"type": "date",
 				"format": "YYYY-MM-dd"
 			},
-			"active": {
-				"type": "boolean"
+			"programURIs": {
+				"type": "keyword"
 			},
+			"programDbIds": {
+				"type": "keyword"
+			},
+			"programURI": {
+				"type": "keyword"
+			},
+			"programDbId": {
+				"type": "keyword"
+			},
+			"programName": {
+				"type": "keyword"
+			},
+			"studyURIs": {
+				"type": "keyword"
+			},
+			"studyDbIds": {
+				"type": "keyword"
+			},
+			"studies": {
+				"properties": {
+					"studyURI": {
+						"type": "keyword"
+					},
+					"studyDbId": {
+						"type": "keyword"
+					},
+					"studyName": {
+						"type": "keyword"
+					},
+					"name": {
+						"type": "keyword"
+					},
+					"locationURI": {
+						"type": "keyword"
+					},
+					"locationDbId": {
+						"type": "keyword"
+					},
+					"locationName": {
+						"type": "keyword"
+					},
+					"active": {
+						"type": "boolean"
+					},
+					"commonCropName": {
+						"type": "keyword"
+					},
+					"contactURIs": {
+						"type": "keyword"
+					},
+					"contactDbIds": {
+						"type": "keyword"
+					},
+					"dataLinks": {
+						"properties": {
+							"name": {
+								"type": "keyword"
+							},
+							"type": {
+								"type": "keyword"
+							},
+							"url": {
+								"type": "keyword"
+							}
+						}
+					},
+					"documentationURL": {
+						"type": "keyword"
+					},
+					"startDate": {
+						"type": "date",
+						"format": "YYYY-MM-dd"
+					},
+					"endDate": {
+						"type": "date",
+						"format": "YYYY-MM-dd"
+					},
+					"license": {
+						"type": "keyword"
+					},
+					"programURIs": {
+						"type": "keyword"
+					},
+					"programDbIds": {
+						"type": "keyword"
+					},
+					"programURI": {
+						"type": "keyword"
+					},
+					"programDbId": {
+						"type": "keyword"
+					},
+					"programName": {
+						"type": "keyword"
+					},
+					"seasons": {
+						"dynamic": "true",
+						"properties": {}
+					},
+					"studyType": {
+						"type": "keyword"
+					},
+					"studyTypeName": {
+						"type": "keyword"
+					},
+					"trialURIs": {
+						"type": "keyword"
+					},
+					"trialDbIds": {
+						"type": "keyword"
+					},
+					"trialURI": {
+						"type": "keyword"
+					},
+					"trialDbId": {
+						"type": "keyword"
+					},
+					"trialName": {
+						"type": "keyword"
+					},
+					"germplasmURIs": {
+						"type": "keyword"
+					},
+					"germplasmDbIds": {
+						"type": "keyword"
+					},
+					"observationVariableURIs": {
+						"type": "keyword"
+					},
+					"observationVariableDbIds": {
+						"type": "keyword"
+					},
+					"locationURIs": {
+						"type": "keyword"
+					},
+					"locationDbIds": {
+						"type": "keyword"
+					},
+					"additionalInfo": {
+						"dynamic": "true",
+						"type": "object",
+						"properties": {}
+					},
+					
+					"source": {
+						"type": "keyword"
+					},
+					"groupId": {
+						"type": "long"
+					},
+					"@type": {
+						"type": "keyword"
+					},
+					"@id": {
+						"type": "keyword"
+					},
+					"schema:includedInDataCatalog": {
+						"type": "keyword"
+					},
+					"schema:identifier": {
+						"type": "keyword"
+					},
+					"schema:name": {
+						"type": "keyword"
+					},
+					"schema:url": {
+						"type": "keyword"
+					}
+				}
+			},			
 			"datasetAuthorship": {
 				"properties": {
 					"license": {
@@ -48,15 +227,24 @@
 					}
 				}
 			},
+			"contactURIs": {
+				"type": "keyword"
+			},
+			"contactDbIds": {
+				"type": "keyword"
+			},
 			"contacts": {
 				"properties": {
+					"contactURI": {
+						"type": "keyword"
+					},
 					"contactDbId": {
 						"type": "keyword"
 					},
 					"name": {
 						"type": "keyword"
 					},
-					"institutionName": {
+					"instituteName": {
 						"type": "keyword"
 					},
 					"email": {
@@ -65,71 +253,57 @@
 					"type": {
 						"type": "keyword"
 					},
-					"contactURI": {
+					"orcid": {
 						"type": "keyword"
 					},
-					"orcid": {
+					"studyURIs": {
 						"type": "keyword"
-					}
-				}
-			},
-			"studies": {
-				"properties": {
-					"studyDbId": {
+					},
+					"studyDbIds": {
 						"type": "keyword"
 					},
-					"studyName": {
+					"trialURIs": {
 						"type": "keyword"
 					},
-					"name": {
+					"trialDbIds": {
 						"type": "keyword"
 					},
-					"locationDbId": {
+					
+					"source": {
 						"type": "keyword"
 					},
-					"locationName": {
+					"groupId": {
+						"type": "long"
+					},
+					"@type": {
 						"type": "keyword"
 					},
-					"studyURI": {
+					"@id": {
 						"type": "keyword"
 					},
-					"locationURI": {
+					"schema:includedInDataCatalog": {
+						"type": "keyword"
+					},
+					"schema:identifier": {
+						"type": "keyword"
+					},
+					"schema:name": {
+						"type": "keyword"
+					},
+					"schema:url": {
 						"type": "keyword"
 					}
 				}
 			},
-			"commonCropName": {
-				"type": "keyword"
-			},
 			"additionalInfo": {
 				"dynamic": "true",
 				"type": "object",
 				"properties": {}
 			},
-			"programDbId": {
-				"type": "keyword"
-			},
-			"programName": {
-				"type": "keyword"
-			},
-			"studyDbIds": {
-				"type": "keyword"
-			},
-			"contactDbIds": {
-				"type": "keyword"
-			},
 
-			"trialURI": {
-				"type": "keyword"
-			},
-
-			"documentationURL": {
-				"type": "keyword"
-			},
 			"source": {
 				"type": "keyword"
 			},
-
 			"groupId": {
 				"type": "long"
 			},
diff --git a/scripts/harvest.sh b/scripts/harvest.sh
index d91297e8..9b397ef9 100755
--- a/scripts/harvest.sh
+++ b/scripts/harvest.sh
@@ -7,9 +7,10 @@ ES_PORT="9200"
 ENV="dev"
 DOCUMENT_TYPES="all"
 
-ALL_DOCUMENT_TYPES="germplasm germplasm-mcpd germplasmAttribute germplasmPedigree germplasmProgeny location program study trial observationUnit datadiscovery"
+ALL_DOCUMENT_TYPES="germplasm germplasmMcpd germplasmAttribute germplasmPedigree germplasmProgeny location program study trial observationUnit datadiscovery"
 ALL_ENVS="dev beta staging int prod test"
 BASEDIR=$(dirname "$0")
+TMP_FILE="log.tmp"
 
 RED='\033[0;31m'
 GREEN='\033[0;32m'
@@ -118,7 +119,7 @@ done
 
 for DOCUMENT_TYPE in ${DOCUMENT_TYPES}; do
 	echo && echo -e "${BOLD}Manage ${DOCUMENT_TYPE} documents...${NC}"
-	INDEX_PATTERN="faidare_${DOCUMENT_TYPE}_${ENV}"
+	INDEX_PATTERN=$(echo "faidare_${DOCUMENT_TYPE}_${ENV}" | sed -E "s/([a-z])([A-Z])/\1-\2/" | tr '[:upper:]' '[:lower:]')
 	
 	# Create template
 	TEMPLATE_NAME="${INDEX_PATTERN}_template"
@@ -139,21 +140,26 @@ for DOCUMENT_TYPE in ${DOCUMENT_TYPES}; do
 	{
 		parallel --bar "
 			curl -s -H 'Content-Type: application/x-ndjson' -H 'Content-Encoding: gzip' -H 'Accept-Encoding: gzip' -XPOST ${ES_HOST}:${ES_PORT}/${INDEX_NAME}/_bulk --data-binary '@{}' > {.}.log.gz" \
-		::: $(find ${DATA_DIR} -name ${DOCUMENT_TYPE}*.json.gz)
+		::: $(find ${DATA_DIR} -name ${DOCUMENT_TYPE}-*.json.gz)
 	} || {
 		code=$?
 		echo -e "${RED}ERROR: a problem occurred when trying to index data with parallel program.${NC}"
 		exit $code
 	}
-	#echo -e "${RED}ERROR: a problem occurred when trying to index data into ${ES_HOST}:${ES_PORT}/${INDEX_NAME} indice.${NC}"
-	parallel "gunzip -c {} | jq '.errors' | grep -q true && echo -e '${ORANGE}ERROR found in {}${NC}' ;" ::: $(find ${DATA_DIR} -name ${DOCUMENT_TYPE}*.log.gz)
+	parallel "gunzip -c {} | jq '.errors' | grep -q true && echo -e '${ORANGE}ERROR found in {}${NC}' >> ${TMP_FILE} ;" ::: $(find ${DATA_DIR} -name ${DOCUMENT_TYPE}-*.log.gz)
+	if [ -f "${TMP_FILE}" ] && [ -s "${TMP_FILE}" ]; then
+		echo -e "${RED}ERROR: a problem occurred when trying to index data into ${ES_HOST}:${ES_PORT}/${INDEX_NAME} indice.${NC}"
+		echo -e "${ORANGE}$(cat ${TMP_FILE})${NC}"
+		rm "${TMP_FILE}"
+		exit 1;
+	fi
 	
 	# Check indexed data
 	echo -e "* Check data indexed from ${DATA_DIR} into ${INDEX_NAME}..."
 	# skip some documents because they contain nested objects that distort the count
 	if [[ "${DOCUMENT_TYPE}" != "germplasmAttribute" && "${DOCUMENT_TYPE}" != "observationUnit" && "${DOCUMENT_TYPE}" != "datadiscovery" ]]; then
 		COUNT_EXTRACTED_DOCS=0
-		for FILE in $(find ${DATA_DIR} -name ${DOCUMENT_TYPE}*.json.gz); do
+		for FILE in $(find ${DATA_DIR} -name ${DOCUMENT_TYPE}-*.json.gz); do
 			COUNT_FILE_DOCS=$(zcat ${FILE} | grep "\"_id\"" | sort | uniq | wc -l)
 			COUNT_EXTRACTED_DOCS=$((COUNT_EXTRACTED_DOCS+COUNT_FILE_DOCS))
 		done
-- 
GitLab


From dcd0a6eedf554ade6ae5aa4dac9c55292f348d4d Mon Sep 17 00:00:00 2001
From: jdestin <jeremy.destin@inra.fr>
Date: Thu, 28 Nov 2019 18:30:01 +0100
Subject: [PATCH 05/11] fix: Add missing fields in trial mapping

---
 .../es/setup/index/trial_mapping.json         | 25 ++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/trial_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/trial_mapping.json
index 4bde6c12..d03aed99 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/trial_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/trial_mapping.json
@@ -23,6 +23,9 @@
 			"commonCropName": {
 				"type": "keyword"
 			},
+      "trialDescription": {
+				"type": "keyword"
+			},
 			"documentationURL": {
 				"type": "keyword"
 			},
@@ -34,6 +37,16 @@
 				"type": "date",
 				"format": "YYYY-MM-dd"
 			},
+      "publications": {
+        "properties": {
+          "publicationReference": {
+            "type": "keyword"
+          },
+          "publicationPUI": {
+            "type": "keyword"
+          }
+        }
+      },
 			"programURIs": {
 				"type": "keyword"
 			},
@@ -69,6 +82,9 @@
 					"name": {
 						"type": "keyword"
 					},
+          "studyDescription": {
+						"type": "keyword"
+					},
 					"locationURI": {
 						"type": "keyword"
 					},
@@ -180,7 +196,7 @@
 						"type": "object",
 						"properties": {}
 					},
-					
+
 					"source": {
 						"type": "keyword"
 					},
@@ -206,7 +222,7 @@
 						"type": "keyword"
 					}
 				}
-			},			
+			},
 			"datasetAuthorship": {
 				"properties": {
 					"license": {
@@ -247,6 +263,9 @@
 					"instituteName": {
 						"type": "keyword"
 					},
+          "institutionName": {
+						"type": "keyword"
+					},
 					"email": {
 						"type": "keyword"
 					},
@@ -268,7 +287,7 @@
 					"trialDbIds": {
 						"type": "keyword"
 					},
-					
+
 					"source": {
 						"type": "keyword"
 					},
-- 
GitLab


From d225c3e5d910da56f6c6dc731f588af3c3623ca5 Mon Sep 17 00:00:00 2001
From: Celia Michotey <celia.michotey@inra.fr>
Date: Sun, 1 Dec 2019 16:28:34 +0100
Subject: [PATCH 06/11] Correct bugs.

---
 scripts/harvest.sh | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/scripts/harvest.sh b/scripts/harvest.sh
index 9b397ef9..a68dcdab 100755
--- a/scripts/harvest.sh
+++ b/scripts/harvest.sh
@@ -7,7 +7,8 @@ ES_PORT="9200"
 ENV="dev"
 DOCUMENT_TYPES="all"
 
-ALL_DOCUMENT_TYPES="germplasm germplasmMcpd germplasmAttribute germplasmPedigree germplasmProgeny location program study trial observationUnit datadiscovery"
+#ALL_DOCUMENT_TYPES="germplasm germplasmMcpd germplasmAttribute germplasmPedigree germplasmProgeny location program study trial observationUnit datadiscovery"
+ALL_DOCUMENT_TYPES="germplasm germplasmAttribute germplasmPedigree germplasmProgeny location program study trial observationUnit datadiscovery"
 ALL_ENVS="dev beta staging int prod test"
 BASEDIR=$(dirname "$0")
 TMP_FILE="log.tmp"
@@ -25,7 +26,7 @@ DESCRIPTION:
 	Script used to index data in FAIDARE
 
 USAGE:
-	${SCRIPT} -jsonDir <JSON directory> -es_host <Elasticsearch node host> -es_port <Elasticsearch node port> -env <application environment name> -type <document type(s) to index> [-h|--help]
+	${SCRIPT} -jsonDir <JSON directory> -es_host <Elasticsearch node host> -es_port <Elasticsearch node port> -env <application environment name> -type <document type(s) to index> [-v|--verbose] [-h|--help]
 
 PARAMS:
 	-jsonDir        The directory where JSON bulk files to index are
@@ -105,10 +106,11 @@ if [ $(find ${DATA_DIR} -name *.json | wc -l) -le 0 ] && [ $(find ${DATA_DIR} -n
 	echo -e "${RED}ERROR: The JSON directory ${DATA_DIR} contains no JSON files!${NC}"
 	echo && help
 fi
-[ "${DOCUMENT_TYPES}" == "all" ] && DOCUMENT_TYPES = "${ALL_DOCUMENT_TYPES}"
+[ "${DOCUMENT_TYPES}" == "all" ] && DOCUMENT_TYPES="${ALL_DOCUMENT_TYPES}"
 for DOCUMENT_TYPE in ${DOCUMENT_TYPES}; do
-	if [ $(find ${DATA_DIR} -name ${DOCUMENT}*.json | wc -l) -le 0 ] && [ $(find ${DATA_DIR} -name ${DOCUMENT}*.json.gz | wc -l) -le 0 ]; then
-		echo -e "${ORANGE}WARNING: The JSON directory ${DATA_DIR} contains no ${DOCUMENT} document!${NC}"
+	if [ $(find ${DATA_DIR} -name "${DOCUMENT_TYPE}*.json" | wc -l) -le 0 ] && [ $(find ${DATA_DIR} -name "${DOCUMENT_TYPE}*.json.gz" | wc -l) -le 0 ]; then
+		echo -e "${ORANGE}WARNING: The JSON directory ${DATA_DIR} contains no ${DOCUMENT_TYPE} document. Type will be ignored!${NC}"
+		DOCUMENT_TYPES=$(echo "${DOCUMENT_TYPES}" | sed "s/ *${DOCUMENT_TYPE} */ /g")
 	fi
 done
 
@@ -221,9 +223,10 @@ for DOCUMENT_TYPE in ${DOCUMENT_TYPES}; do
 	done
 	
 	# Delete all but last created indices (thanks to the timestamp suffix)
-	echo -e "* Delete old indices ${INDEX_PATTERN} (to avoid accumulation over time)..."
-	OLD_INDICES=$(curl -sf -XGET "${ES_HOST}:${ES_PORT}/_cat/indices/${INDEX_PATTERN}?h=index" | sort | head -n -1)
+	echo -e "* Delete old indices ${INDEX_PATTERN} (to avoid accumulation over time):"
+	OLD_INDICES=$(curl -sf -XGET "${ES_HOST}:${ES_PORT}/_cat/indices/${INDEX_PATTERN}*?h=index" | sort | head -n -1)
 	for OLD_INDEX in ${OLD_INDICES}; do
+		echo -e "\t${OLD_INDEX}..."
 		LOG=$(curl -s -XDELETE "${ES_HOST}:${ES_PORT}/${OLD_INDEX}")
 		check_acknowledgment "${LOG}" "delete index ${OLD_INDEX}"
 	done
-- 
GitLab


From c066e35b55d302cf44deb54a9647beeaaad44e66 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rapha=C3=ABl=20Flores?= <raphael.flores@inra.fr>
Date: Thu, 6 Feb 2020 19:02:54 +0100
Subject: [PATCH 07/11] Increase the agg bucket size to fetch all existing
 groupdId, allowing to create aliases for all of them, not only 10 by default.

---
 scripts/harvest.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/harvest.sh b/scripts/harvest.sh
index a68dcdab..24d877ea 100755
--- a/scripts/harvest.sh
+++ b/scripts/harvest.sh
@@ -189,7 +189,10 @@ for DOCUMENT_TYPE in ${DOCUMENT_TYPES}; do
 	"size":"0",
 	"aggs" : {
 		"uniq_group" : {
-			"terms" : { "field" : "groupId" }
+			"terms" : {
+				"field" : "groupId",
+				"size": 99999
+			}
 		}
 	}
 }' | jq -cr '.aggregations.uniq_group.buckets[].key') # Extract ES aggregation bucket keys
-- 
GitLab


From e6b2ab1aeb2883826abcdbc0552cfc3c63b364b1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rapha=C3=ABl=20Flores?= <raphael.flores@inra.fr>
Date: Thu, 6 Feb 2020 19:04:10 +0100
Subject: [PATCH 08/11] Fixes quotes.

---
 scripts/harvest.sh | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/scripts/harvest.sh b/scripts/harvest.sh
index 24d877ea..6949773f 100755
--- a/scripts/harvest.sh
+++ b/scripts/harvest.sh
@@ -22,7 +22,7 @@ NC='\033[0m' # No format
 
 help() {
 	cat <<EOF
-DESCRIPTION: 
+DESCRIPTION:
 	Script used to index data in FAIDARE
 
 USAGE:
@@ -66,7 +66,7 @@ for PROGRAM in ${PROGRAMS}; do
 		((MISSING_COUNT += 1))
 	}
 done
-if [ $MISSING_COUNT -ne 0 ]; then 
+if [ $MISSING_COUNT -ne 0 ]; then
 	echo -e "${RED}ERROR: You must install the $MISSING_COUNT missing program(s).${NC}"
 	exit $MISSING_COUNT
 fi
@@ -102,7 +102,7 @@ if [ ! -d "${DATA_DIR}" ]; then
 	echo -e "${RED}ERROR: Mandatory parameter 'jsonDir' is missing!${NC}"
 	echo && help
 fi
-if [ $(find ${DATA_DIR} -name *.json | wc -l) -le 0 ] && [ $(find ${DATA_DIR} -name *.json.gz | wc -l) -le 0 ]; then
+if [ $(find ${DATA_DIR} -name "*.json" | wc -l) -le 0 ] && [ $(find ${DATA_DIR} -name "*.json.gz" | wc -l) -le 0 ]; then
 	echo -e "${RED}ERROR: The JSON directory ${DATA_DIR} contains no JSON files!${NC}"
 	echo && help
 fi
@@ -115,7 +115,7 @@ for DOCUMENT_TYPE in ${DOCUMENT_TYPES}; do
 done
 
 # Compress JSON files
-for FILE in $(find ${DATA_DIR} -name *.json); do
+for FILE in $(find ${DATA_DIR} -name "*.json"); do
 	gzip $FILE
 done
 
@@ -130,38 +130,38 @@ for DOCUMENT_TYPE in ${DOCUMENT_TYPES}; do
 {
 	\"index_patterns\": [\"${INDEX_PATTERN}-*\"],
 	\"order\": 101,
-	\"mappings\": 
+	\"mappings\":
 		$(cat ${BASEDIR}/../backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/${DOCUMENT_TYPE}_mapping.json),
 	\"settings\": $(cat ${BASEDIR}/../backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/settings.json)
 }")
 	check_acknowledgment "${LOG}" "create template"
-	
+
 	# Index JSON Bulk
 	INDEX_NAME="${INDEX_PATTERN}-d"$(date +%s)
 	echo -e "* Index documents into ${ES_HOST}:${ES_PORT}/${INDEX_NAME} indice..."
 	{
 		parallel --bar "
 			curl -s -H 'Content-Type: application/x-ndjson' -H 'Content-Encoding: gzip' -H 'Accept-Encoding: gzip' -XPOST ${ES_HOST}:${ES_PORT}/${INDEX_NAME}/_bulk --data-binary '@{}' > {.}.log.gz" \
-		::: $(find ${DATA_DIR} -name ${DOCUMENT_TYPE}-*.json.gz)
+		::: $(find ${DATA_DIR} -name "${DOCUMENT_TYPE}-*.json.gz")
 	} || {
 		code=$?
 		echo -e "${RED}ERROR: a problem occurred when trying to index data with parallel program.${NC}"
 		exit $code
 	}
-	parallel "gunzip -c {} | jq '.errors' | grep -q true && echo -e '${ORANGE}ERROR found in {}${NC}' >> ${TMP_FILE} ;" ::: $(find ${DATA_DIR} -name ${DOCUMENT_TYPE}-*.log.gz)
+	parallel "gunzip -c {} | jq '.errors' | grep -q true && echo -e '${ORANGE}ERROR found in {}${NC}' >> ${TMP_FILE} ;" ::: $(find ${DATA_DIR} -name "${DOCUMENT_TYPE}-*.log.gz")
 	if [ -f "${TMP_FILE}" ] && [ -s "${TMP_FILE}" ]; then
 		echo -e "${RED}ERROR: a problem occurred when trying to index data into ${ES_HOST}:${ES_PORT}/${INDEX_NAME} indice.${NC}"
 		echo -e "${ORANGE}$(cat ${TMP_FILE})${NC}"
 		rm "${TMP_FILE}"
 		exit 1;
 	fi
-	
+
 	# Check indexed data
 	echo -e "* Check data indexed from ${DATA_DIR} into ${INDEX_NAME}..."
 	# skip some documents because they contain nested objects that distort the count
 	if [[ "${DOCUMENT_TYPE}" != "germplasmAttribute" && "${DOCUMENT_TYPE}" != "observationUnit" && "${DOCUMENT_TYPE}" != "datadiscovery" ]]; then
 		COUNT_EXTRACTED_DOCS=0
-		for FILE in $(find ${DATA_DIR} -name ${DOCUMENT_TYPE}-*.json.gz); do
+		for FILE in $(find ${DATA_DIR} -name "${DOCUMENT_TYPE}-*.json.gz"); do
 			COUNT_FILE_DOCS=$(zcat ${FILE} | grep "\"_id\"" | sort | uniq | wc -l)
 			COUNT_EXTRACTED_DOCS=$((COUNT_EXTRACTED_DOCS+COUNT_FILE_DOCS))
 		done
@@ -200,7 +200,7 @@ for DOCUMENT_TYPE in ${DOCUMENT_TYPES}; do
 		echo -e "${RED}ERROR: could not list 'groupId' values from index.${NC}"
 		exit 1;
 	}
-	echo -e "* Create aliases:"	
+	echo -e "* Create aliases:"
 	for GROUP_ID in ${GROUP_IDS}; do
 		ALIAS_NAME="${INDEX_PATTERN}-group${GROUP_ID}"
 		FILTER=""
-- 
GitLab


From 62e1b4f43148e416bf8f7bd554d85d6516a3a615 Mon Sep 17 00:00:00 2001
From: Celia Michotey <celia.michotey@inra.fr>
Date: Wed, 19 Feb 2020 16:30:14 +0100
Subject: [PATCH 09/11] Update mappings to match the new sources JSON schemas.

---
 .../es/setup/index/germplasm_mapping.json     | 18 +++++++++
 .../es/setup/index/location_mapping.json      |  3 ++
 .../es/setup/index/study_mapping.json         | 10 +++++
 .../es/setup/index/trial_mapping.json         | 37 +++++++++++++------
 4 files changed, 56 insertions(+), 12 deletions(-)

diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasm_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasm_mapping.json
index 3298d98a..cb66adb0 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasm_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasm_mapping.json
@@ -35,6 +35,9 @@
 			"countryOfOriginCode": {
 				"type": "keyword"
 			},
+			"countryOfOrigin": {
+                                "type": "keyword"
+                        },
 			"defaultDisplayName": {
 				"type": "keyword"
 			},
@@ -557,6 +560,21 @@
 					}
 				}
 			},
+			"xref": {
+				"properties": {
+                                        "id": {
+						"type": "keyword"
+					},
+					"source": {
+						"type": "keyword"
+					}
+				}
+                        },
+			"additionalInfo": {
+                                "dynamic": "true",
+                                "properties": {}
+                        },
+
 			"studyURIs": {
 				"type": "keyword"
 			},
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/location_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/location_mapping.json
index 8ab41d2a..57c7ade3 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/location_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/location_mapping.json
@@ -23,6 +23,9 @@
 			"locationType": {
 				"type": "keyword"
 			},
+			"type": {
+                                "type": "keyword"
+                        },
 			"countryCode": {
 				"type": "keyword"
 			},
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/study_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/study_mapping.json
index d1f7286d..ea2a7e22 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/study_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/study_mapping.json
@@ -20,6 +20,16 @@
 			"commonCropName": {
 				"type": "keyword"
 			},
+			"cropDbId": {
+                                "type": "keyword"
+                        },
+			"statisticalDesign": {
+				"dynamic": "true",
+				"properties": {}
+                        },
+			"description": {
+                                "type": "keyword"
+                        },
 			"organism": {
 				"type": "keyword"
 			},
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/trial_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/trial_mapping.json
index d03aed99..3793e3f8 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/trial_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/trial_mapping.json
@@ -23,7 +23,10 @@
 			"commonCropName": {
 				"type": "keyword"
 			},
-      "trialDescription": {
+			"cropDbId": {
+				"type": "keyword"
+			},
+			"trialDescription": {
 				"type": "keyword"
 			},
 			"documentationURL": {
@@ -37,16 +40,16 @@
 				"type": "date",
 				"format": "YYYY-MM-dd"
 			},
-      "publications": {
-        "properties": {
-          "publicationReference": {
-            "type": "keyword"
-          },
-          "publicationPUI": {
-            "type": "keyword"
-          }
-        }
-      },
+			"publications": {
+				"properties": {
+					"publicationReference": {
+						"type": "keyword"
+					},
+					"publicationPUI": {
+						"type": "keyword"
+					}
+				}
+			},
 			"programURIs": {
 				"type": "keyword"
 			},
@@ -82,9 +85,12 @@
 					"name": {
 						"type": "keyword"
 					},
-          "studyDescription": {
+					"studyDescription": {
 						"type": "keyword"
 					},
+					"description": {
+                                                "type": "keyword"
+                                        },
 					"locationURI": {
 						"type": "keyword"
 					},
@@ -100,6 +106,9 @@
 					"commonCropName": {
 						"type": "keyword"
 					},
+					"cropDbId": {
+						"type": "keyword"
+					},
 					"contactURIs": {
 						"type": "keyword"
 					},
@@ -130,6 +139,10 @@
 						"type": "date",
 						"format": "YYYY-MM-dd"
 					},
+					"lastUpdate": {
+                                                "dynamic": "true",
+                                                "properties": {}
+					},
 					"license": {
 						"type": "keyword"
 					},
-- 
GitLab


From 64a46400140d8d2a1cfb4443bc91c1307b25421d Mon Sep 17 00:00:00 2001
From: Celia Michotey <celia.michotey@inra.fr>
Date: Wed, 19 Feb 2020 16:31:40 +0100
Subject: [PATCH 10/11] Update filter request to correctly create group 0
 aliases.

---
 backend/src/main/resources/application.yml | 1 +
 scripts/harvest.sh                         | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/backend/src/main/resources/application.yml b/backend/src/main/resources/application.yml
index 8f989fcc..28fa23c5 100644
--- a/backend/src/main/resources/application.yml
+++ b/backend/src/main/resources/application.yml
@@ -81,6 +81,7 @@ faidare:
     url: https://terraref.org
     name: TERRA-REF
     image: https://urgi.versailles.inra.fr/files/faidare/logo/TERRAREF.png
+
 server:
   compression:
     enabled: true
diff --git a/scripts/harvest.sh b/scripts/harvest.sh
index 6949773f..3d5504d1 100755
--- a/scripts/harvest.sh
+++ b/scripts/harvest.sh
@@ -205,7 +205,7 @@ for DOCUMENT_TYPE in ${DOCUMENT_TYPES}; do
 		ALIAS_NAME="${INDEX_PATTERN}-group${GROUP_ID}"
 		FILTER=""
 		if [[ "$GROUP_ID" = "0" || "${GROUP_ID}" =  "null" ]]; then
-			FILTER="{ \"bool\" : { \"must_not\" : { \"exists\" : { \"field\" : \"groupId\" } } } }"
+			FILTER="{ \"bool\": { \"should\": [ { \"bool\": { \"must_not\": { \"exists\": { \"field\": \"groupId\" } } } }, { \"term\": { \"groupId\": 0 } } ] } }"
 		else
 			FILTER="{ \"term\" : { \"groupId\" : \"${GROUP_ID}\" } }"
 		fi
-- 
GitLab


From 21918f97a3063a120c82a1c1c3155026a8b28501 Mon Sep 17 00:00:00 2001
From: Celia Michotey <celia.michotey@inra.fr>
Date: Thu, 20 Feb 2020 14:38:39 +0100
Subject: [PATCH 11/11] Update tests to match mapping modifications.

---
 .secrets.baseline                             | 271 ++++++++++++++----
 .../domain/brapi/v1/data/BrapiLocation.java   |   6 +-
 .../urgi/faidare/domain/data/LocationVO.java  |  28 +-
 backend/src/main/resources/application.yml    |   7 +-
 .../repository/es/LocationRepositoryTest.java |   6 +-
 .../es/setup/fixture/germplasm0.json          |   2 +-
 .../es/setup/fixture/location0.json           |   4 +-
 .../es/setup/index/germplasm_mapping.json     |   4 +-
 .../es/setup/index/location_mapping.json      |   4 +-
 frontend/src/app/brapi.service.spec.ts        |   4 +-
 frontend/src/app/map/map.component.spec.ts    |   4 +-
 frontend/src/app/models/brapi.model.ts        |   4 +-
 .../app/site-card/site-card.component.html    |   4 +-
 .../app/site-card/site-card.component.spec.ts |   4 +-
 .../study-card/study-card.component.spec.ts   |   8 +-
 15 files changed, 259 insertions(+), 101 deletions(-)

diff --git a/.secrets.baseline b/.secrets.baseline
index e1fe1bd5..dc028389 100644
--- a/.secrets.baseline
+++ b/.secrets.baseline
@@ -1049,11 +1049,18 @@
       }
     ],
     "backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/datadiscovery_mapping.json": [
+      {
+        "hashed_secret": "344a627efbdf17dfc804f04e2eb1626843c0e825",
+        "is_secret": false,
+        "is_verified": false,
+        "line_number": 36,
+        "type": "Base64 High Entropy String"
+      },
       {
         "hashed_secret": "d0346392c0a55403e2f845c277b44f3c2dd75356",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 73,
+        "line_number": 85,
         "type": "Base64 High Entropy String"
       }
     ],
@@ -1065,6 +1072,20 @@
         "line_number": 2,
         "type": "Base64 High Entropy String"
       },
+      {
+        "hashed_secret": "33eaf59bec55989c018c03e0c08e7c84468d0989",
+        "is_secret": false,
+        "is_verified": false,
+        "line_number": 5,
+        "type": "Base64 High Entropy String"
+      },
+      {
+        "hashed_secret": "00151beea622cd89dd76a49f565c0e0fedfda196",
+        "is_secret": false,
+        "is_verified": false,
+        "line_number": 8,
+        "type": "Base64 High Entropy String"
+      },
       {
         "hashed_secret": "344a627efbdf17dfc804f04e2eb1626843c0e825",
         "is_secret": false,
@@ -1074,134 +1095,169 @@
       }
     ],
     "backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmPedigree_mapping.json": [
+      {
+        "hashed_secret": "4e6b74a5f8dcffcf88aa65d37b9cc39350417075",
+        "is_secret": false,
+        "is_verified": false,
+        "line_number": 5,
+        "type": "Base64 High Entropy String"
+      },
+      {
+        "hashed_secret": "7b498d397c91a97424810ee96fdedea25cd57ba1",
+        "is_secret": false,
+        "is_verified": false,
+        "line_number": 8,
+        "type": "Base64 High Entropy String"
+      },
       {
         "hashed_secret": "344a627efbdf17dfc804f04e2eb1626843c0e825",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 29,
+        "line_number": 61,
         "type": "Base64 High Entropy String"
       },
       {
         "hashed_secret": "8aeabf21d3d9e270937890493769a88db1669c1c",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 41,
+        "line_number": 64,
         "type": "Base64 High Entropy String"
       }
     ],
     "backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmProgeny_mapping.json": [
       {
-        "hashed_secret": "8aeabf21d3d9e270937890493769a88db1669c1c",
+        "hashed_secret": "98a0735d3da290e8f12cccded043a0c03230aaa4",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 18,
+        "line_number": 5,
+        "type": "Base64 High Entropy String"
+      },
+      {
+        "hashed_secret": "58784c2b5d9df6ac722be78940aea4a78e53db6e",
+        "is_secret": false,
+        "is_verified": false,
+        "line_number": 8,
         "type": "Base64 High Entropy String"
       },
       {
         "hashed_secret": "344a627efbdf17dfc804f04e2eb1626843c0e825",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 21,
+        "line_number": 25,
+        "type": "Base64 High Entropy String"
+      },
+      {
+        "hashed_secret": "8aeabf21d3d9e270937890493769a88db1669c1c",
+        "is_secret": false,
+        "is_verified": false,
+        "line_number": 28,
         "type": "Base64 High Entropy String"
       }
     ],
     "backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasm_mapping.json": [
       {
-        "hashed_secret": "e74767ee7e0c0605639855344de4098474d6a035",
+        "hashed_secret": "344a627efbdf17dfc804f04e2eb1626843c0e825",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 11,
+        "line_number": 8,
         "type": "Base64 High Entropy String"
       },
       {
-        "hashed_secret": "344a627efbdf17dfc804f04e2eb1626843c0e825",
+        "hashed_secret": "ce74e278f4bd61efdd35fcdce522284654db7762",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 14,
+        "line_number": 25,
         "type": "Base64 High Entropy String"
       },
       {
-        "hashed_secret": "8aeabf21d3d9e270937890493769a88db1669c1c",
+        "hashed_secret": "012998a2c2a373295a416186fadd47092b8b6a18",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 17,
+        "line_number": 28,
         "type": "Base64 High Entropy String"
       },
       {
-        "hashed_secret": "ce74e278f4bd61efdd35fcdce522284654db7762",
+        "hashed_secret": "a577a4f5f8dab94eff3f257aec15319f14a8037a",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 51,
+        "line_number": 35,
         "type": "Base64 High Entropy String"
       },
       {
-        "hashed_secret": "a577a4f5f8dab94eff3f257aec15319f14a8037a",
+        "hashed_secret": "8aeabf21d3d9e270937890493769a88db1669c1c",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 54,
+        "line_number": 41,
         "type": "Base64 High Entropy String"
       },
       {
-        "hashed_secret": "8bc4d3d053073fb0ca1be835e7df704f5e9e59c8",
+        "hashed_secret": "e74767ee7e0c0605639855344de4098474d6a035",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 57,
+        "line_number": 44,
         "type": "Base64 High Entropy String"
       },
       {
         "hashed_secret": "d040d54181adb8004eb93b9aa8d524a9f9fd15e0",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 91,
+        "line_number": 52,
         "type": "Base64 High Entropy String"
       },
       {
         "hashed_secret": "bdc2a9b3bb8f37f0e0878203c438c5532311e456",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 94,
+        "line_number": 58,
         "type": "Base64 High Entropy String"
       },
       {
         "hashed_secret": "084c833a01fb1d770f994aaec6a07f282e41827a",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 137,
+        "line_number": 122,
+        "type": "Base64 High Entropy String"
+      },
+      {
+        "hashed_secret": "8bc4d3d053073fb0ca1be835e7df704f5e9e59c8",
+        "is_secret": false,
+        "is_verified": false,
+        "line_number": 169,
         "type": "Base64 High Entropy String"
       },
       {
         "hashed_secret": "2a69cd41c702095b3a691f8af030a26c01c56f94",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 236,
+        "line_number": 262,
         "type": "Base64 High Entropy String"
       },
       {
         "hashed_secret": "a1a3ca02f085d8764199a02ec874180bc531044b",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 245,
+        "line_number": 271,
         "type": "Base64 High Entropy String"
       },
       {
         "hashed_secret": "52358cbf3e977b038f019edc3b5bbef04f6a8c32",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 271,
+        "line_number": 297,
         "type": "Base64 High Entropy String"
       },
       {
         "hashed_secret": "38d9070c435d5fc2e1186bf2c4ff4ddd39dc60c7",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 471,
+        "line_number": 497,
         "type": "Base64 High Entropy String"
       },
       {
         "hashed_secret": "78b81b0db9858bec686e7f868c87b47a49b94c8c",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 532,
+        "line_number": 558,
         "type": "Base64 High Entropy String"
       }
     ],
@@ -1210,100 +1266,121 @@
         "hashed_secret": "e74767ee7e0c0605639855344de4098474d6a035",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 51,
+        "line_number": 35,
         "type": "Base64 High Entropy String"
       }
     ],
     "backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/observationUnit_mapping.json": [
       {
-        "hashed_secret": "2551dc9d8bf4d26a73430ce6b030ed92e8d16c0e",
+        "hashed_secret": "0c0602d57a515d6428cbf114b34d7a22137d0021",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 14,
+        "line_number": 5,
         "type": "Base64 High Entropy String"
       },
       {
-        "hashed_secret": "2402e29f071d5850104e80f675c9cb1cc4667dc5",
+        "hashed_secret": "2551dc9d8bf4d26a73430ce6b030ed92e8d16c0e",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 23,
+        "line_number": 8,
         "type": "Base64 High Entropy String"
       },
       {
         "hashed_secret": "6002039add8a7885d38a6542bdce3acdaf936fb4",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 52,
+        "line_number": 11,
         "type": "Base64 High Entropy String"
       },
       {
         "hashed_secret": "344a627efbdf17dfc804f04e2eb1626843c0e825",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 58,
+        "line_number": 47,
+        "type": "Base64 High Entropy String"
+      },
+      {
+        "hashed_secret": "38d9070c435d5fc2e1186bf2c4ff4ddd39dc60c7",
+        "is_secret": false,
+        "is_verified": false,
+        "line_number": 56,
+        "type": "Base64 High Entropy String"
+      },
+      {
+        "hashed_secret": "2402e29f071d5850104e80f675c9cb1cc4667dc5",
+        "is_secret": false,
+        "is_verified": false,
+        "line_number": 65,
         "type": "Base64 High Entropy String"
       },
       {
         "hashed_secret": "2df7d10363b2ada000a8cc031ec38febf4b15876",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 64,
+        "line_number": 78,
         "type": "Base64 High Entropy String"
       },
       {
-        "hashed_secret": "921bd972137666fa4e9467b44243e0d5d3cee1fd",
+        "hashed_secret": "205078c35ddce349e66a7812e9eb6a964b7b2f0f",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 80,
+        "line_number": 91,
         "type": "Base64 High Entropy String"
       },
       {
         "hashed_secret": "aacf4ca2a9ef5d886765677f925013e7e90365f3",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 131,
+        "line_number": 94,
         "type": "Base64 High Entropy String"
       },
       {
-        "hashed_secret": "16446a8fe4999a2dc3381b100b249a63e8bc82af",
+        "hashed_secret": "fe4bdf7ff8c0bde6ff4a5fe73c3df64686b59da0",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 134,
+        "line_number": 101,
         "type": "Base64 High Entropy String"
       },
       {
-        "hashed_secret": "4b7ddad028dd65bc04a04513b452aa2075b986c7",
+        "hashed_secret": "41eb5625f5040c318ff364b48309d86d434f0309",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 137,
+        "line_number": 108,
         "type": "Base64 High Entropy String"
       },
       {
-        "hashed_secret": "fe4bdf7ff8c0bde6ff4a5fe73c3df64686b59da0",
+        "hashed_secret": "16446a8fe4999a2dc3381b100b249a63e8bc82af",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 140,
+        "line_number": 111,
         "type": "Base64 High Entropy String"
       },
       {
-        "hashed_secret": "abf79a44146478a20f13f902ae2a558dddba9840",
+        "hashed_secret": "4b7ddad028dd65bc04a04513b452aa2075b986c7",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 157,
+        "line_number": 114,
         "type": "Base64 High Entropy String"
       },
       {
-        "hashed_secret": "38d9070c435d5fc2e1186bf2c4ff4ddd39dc60c7",
+        "hashed_secret": "6337ad4b23e55afd26f8740749e57303c1eec31c",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 182,
+        "line_number": 162,
+        "type": "Base64 High Entropy String"
+      },
+      {
+        "hashed_secret": "921bd972137666fa4e9467b44243e0d5d3cee1fd",
+        "is_secret": false,
+        "is_verified": false,
+        "line_number": 165,
         "type": "Base64 High Entropy String"
       },
       {
         "hashed_secret": "93e1c42e7930d5dbc24a9fec0d4f0f21a08c007b",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 194,
+        "line_number": 197,
         "type": "Base64 High Entropy String"
       }
     ],
@@ -1312,6 +1389,13 @@
         "hashed_secret": "e74767ee7e0c0605639855344de4098474d6a035",
         "is_secret": false,
         "is_verified": false,
+        "line_number": 23,
+        "type": "Base64 High Entropy String"
+      },
+      {
+        "hashed_secret": "468ee5a5c55cfbe1809ed69e8f70cc085acb5df2",
+        "is_secret": false,
+        "is_verified": false,
         "line_number": 29,
         "type": "Base64 High Entropy String"
       }
@@ -1340,25 +1424,46 @@
       }
     ],
     "backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/study_mapping.json": [
+      {
+        "hashed_secret": "21dd317a0556efd2b68ba31da5abdf544617c8a4",
+        "is_secret": false,
+        "is_verified": false,
+        "line_number": 114,
+        "type": "Base64 High Entropy String"
+      },
+      {
+        "hashed_secret": "e74767ee7e0c0605639855344de4098474d6a035",
+        "is_secret": false,
+        "is_verified": false,
+        "line_number": 155,
+        "type": "Base64 High Entropy String"
+      },
+      {
+        "hashed_secret": "c662a29dce3c6c5bea525be1a7fd7956ac1fae3b",
+        "is_secret": false,
+        "is_verified": false,
+        "line_number": 201,
+        "type": "Base64 High Entropy String"
+      },
       {
         "hashed_secret": "e02307234404d08f6346900b32b17ca90f9c4ed8",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 60,
+        "line_number": 234,
         "type": "Base64 High Entropy String"
       },
       {
-        "hashed_secret": "f98c96dfd0a6ae593449b5dd101af7838d2e4837",
+        "hashed_secret": "dc30764ce81629f15d8423d97f5eaac8f86817bb",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 91,
+        "line_number": 237,
         "type": "Base64 High Entropy String"
       },
       {
-        "hashed_secret": "e74767ee7e0c0605639855344de4098474d6a035",
+        "hashed_secret": "f98c96dfd0a6ae593449b5dd101af7838d2e4837",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 122,
+        "line_number": 240,
         "type": "Base64 High Entropy String"
       }
     ],
@@ -1372,11 +1477,60 @@
       }
     ],
     "backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/trial_mapping.json": [
+      {
+        "hashed_secret": "c11c73c2efefc4ce6b873bb87ec5ef956b649367",
+        "is_secret": false,
+        "is_verified": false,
+        "line_number": 45,
+        "type": "Base64 High Entropy String"
+      },
+      {
+        "hashed_secret": "278de07e8dd2362e5535d3d99fd2ed2120a59014",
+        "is_secret": false,
+        "is_verified": false,
+        "line_number": 48,
+        "type": "Base64 High Entropy String"
+      },
+      {
+        "hashed_secret": "c662a29dce3c6c5bea525be1a7fd7956ac1fae3b",
+        "is_secret": false,
+        "is_verified": false,
+        "line_number": 88,
+        "type": "Base64 High Entropy String"
+      },
       {
         "hashed_secret": "e74767ee7e0c0605639855344de4098474d6a035",
         "is_secret": false,
         "is_verified": false,
-        "line_number": 89,
+        "line_number": 131,
+        "type": "Base64 High Entropy String"
+      },
+      {
+        "hashed_secret": "e02307234404d08f6346900b32b17ca90f9c4ed8",
+        "is_secret": false,
+        "is_verified": false,
+        "line_number": 192,
+        "type": "Base64 High Entropy String"
+      },
+      {
+        "hashed_secret": "dc30764ce81629f15d8423d97f5eaac8f86817bb",
+        "is_secret": false,
+        "is_verified": false,
+        "line_number": 195,
+        "type": "Base64 High Entropy String"
+      },
+      {
+        "hashed_secret": "f98c96dfd0a6ae593449b5dd101af7838d2e4837",
+        "is_secret": false,
+        "is_verified": false,
+        "line_number": 198,
+        "type": "Base64 High Entropy String"
+      },
+      {
+        "hashed_secret": "21dd317a0556efd2b68ba31da5abdf544617c8a4",
+        "is_secret": false,
+        "is_verified": false,
+        "line_number": 204,
         "type": "Base64 High Entropy String"
       }
     ],
@@ -2178,6 +2332,15 @@
         "line_number": 170,
         "type": "Base64 High Entropy String"
       }
+    ],
+    "scripts/harvest.sh": [
+      {
+        "hashed_secret": "9b4ea0964706f977148ec989e7373d9622613547",
+        "is_secret": false,
+        "is_verified": false,
+        "line_number": 162,
+        "type": "Base64 High Entropy String"
+      }
     ]
   },
   "version": "0.13.0",
diff --git a/backend/src/main/java/fr/inra/urgi/faidare/domain/brapi/v1/data/BrapiLocation.java b/backend/src/main/java/fr/inra/urgi/faidare/domain/brapi/v1/data/BrapiLocation.java
index 9a1a35a7..81ffd3a9 100644
--- a/backend/src/main/java/fr/inra/urgi/faidare/domain/brapi/v1/data/BrapiLocation.java
+++ b/backend/src/main/java/fr/inra/urgi/faidare/domain/brapi/v1/data/BrapiLocation.java
@@ -51,15 +51,15 @@ public interface BrapiLocation extends HasBrapiDocumentationURL {
     // Institution
 
     @JsonView(JSONView.BrapiFields.class)
-    String getInstitutionAddress();
+    String getInstituteAddress();
 
     // For backward compatibility with brapi v1
     @JsonView(JSONView.BrapiFields.class)
     @Deprecated
-    String getInstitutionAdress();
+    String getInstituteAdress();
 
     @JsonView(JSONView.BrapiFields.class)
-    String getInstitutionName();
+    String getInstituteName();
 
     // Additional info
     @JsonView(JSONView.BrapiFields.class)
diff --git a/backend/src/main/java/fr/inra/urgi/faidare/domain/data/LocationVO.java b/backend/src/main/java/fr/inra/urgi/faidare/domain/data/LocationVO.java
index f8dea56d..f22c2bf5 100644
--- a/backend/src/main/java/fr/inra/urgi/faidare/domain/data/LocationVO.java
+++ b/backend/src/main/java/fr/inra/urgi/faidare/domain/data/LocationVO.java
@@ -29,8 +29,8 @@ public class LocationVO implements GnpISInternal, BrapiLocation, HasURI, HasURL,
     private String countryCode;
     private String countryName;
 
-    private String institutionAddress;
-    private String institutionName;
+    private String instituteAddress;
+    private String instituteName;
 
     private Double altitude;
     private Double latitude;
@@ -111,19 +111,19 @@ public class LocationVO implements GnpISInternal, BrapiLocation, HasURI, HasURL,
     }
 
     @Override
-    public String getInstitutionAddress() {
-        return institutionAddress;
+    public String getInstituteAddress() {
+        return instituteAddress;
     }
 
     @Deprecated
     @Override
-    public String getInstitutionAdress() {
-        return institutionAddress;
+    public String getInstituteAdress() {
+        return instituteAddress;
     }
 
     @Override
-    public String getInstitutionName() {
-        return institutionName;
+    public String getInstituteName() {
+        return instituteName;
     }
 
     @Override
@@ -184,16 +184,16 @@ public class LocationVO implements GnpISInternal, BrapiLocation, HasURI, HasURL,
         this.countryName = countryName;
     }
 
-    public void setInstitutionAddress(String institutionAddress) {
-        this.institutionAddress = institutionAddress;
+    public void setInstituteAddress(String instituteAddress) {
+        this.instituteAddress = instituteAddress;
     }
 
-    public void setInstitutionAdress(String institutionAdress) {
-        this.institutionAddress = institutionAdress;
+    public void setInstituteAdress(String instituteAdress) {
+        this.instituteAddress = instituteAdress;
     }
 
-    public void setInstitutionName(String institutionName) {
-        this.institutionName = institutionName;
+    public void setInstituteName(String instituteName) {
+        this.instituteName = instituteName;
     }
 
     public void setAltitude(Double altitude) {
diff --git a/backend/src/main/resources/application.yml b/backend/src/main/resources/application.yml
index 28fa23c5..d84119e5 100644
--- a/backend/src/main/resources/application.yml
+++ b/backend/src/main/resources/application.yml
@@ -66,12 +66,7 @@ faidare:
     url: http://tropgenedb.cirad.fr
     name: CIRAD TropGENE
     image: https://urgi.versailles.inra.fr/files/faidare/logo/CIRAD.jpg
-  # EVA
-  - uri: https://www.ebi.ac.uk/eva
-    url: https://www.ebi.ac.uk/eva
-    name: EVA
-    image: https://urgi.versailles.inra.fr/files/faidare/logo/EVA.png
-  # ENA
+  # EVA/ENA
   - uri: https://www.ebi.ac.uk/eva
     url: https://www.ebi.ac.uk/eva
     name: EBI European Nucleotide Archive
diff --git a/backend/src/test/java/fr/inra/urgi/faidare/repository/es/LocationRepositoryTest.java b/backend/src/test/java/fr/inra/urgi/faidare/repository/es/LocationRepositoryTest.java
index 879ce410..88bcef7e 100644
--- a/backend/src/test/java/fr/inra/urgi/faidare/repository/es/LocationRepositoryTest.java
+++ b/backend/src/test/java/fr/inra/urgi/faidare/repository/es/LocationRepositoryTest.java
@@ -75,16 +75,16 @@ class LocationRepositoryTest {
 
     @SuppressWarnings("deprecation")
     @Test
-    void should_Have_Same_InstitutionAddress_And_InstitutionAdress() {
+    void should_Have_Same_InstituteAddress_And_InstituteAdress() {
         // 805
         LocationVO result = repository.getById("805");
         assertThat(result).isNotNull();
-        assertThat(result.getInstitutionAddress()).isNotBlank().isEqualTo(result.getInstitutionAdress());
+        assertThat(result.getInstituteAddress()).isNotBlank().isEqualTo(result.getInstituteAdress());
 
         // 806
         result = repository.getById("806");
         assertThat(result).isNotNull();
-        assertThat(result.getInstitutionAddress()).isNotBlank().isEqualTo(result.getInstitutionAdress());
+        assertThat(result.getInstituteAddress()).isNotBlank().isEqualTo(result.getInstituteAdress());
     }
 
     @Test
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/fixture/germplasm0.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/fixture/germplasm0.json
index 041375e5..6d275e99 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/fixture/germplasm0.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/fixture/germplasm0.json
@@ -26,7 +26,7 @@
     "species": "melongena"
   },
   {
-    "docId": "ZG9pOjEwLjE1NDU0LzEuNDkyMTc4NjY1NTk0NDEwNkUxMg==",
+    "germplasmDbId": "ZG9pOjEwLjE1NDU0LzEuNDkyMTc4NjY1NTk0NDEwNkUxMg==",
     "accessionNumber": "A0336",
     "genus": "Solanum",
     "species": "melongena"
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/fixture/location0.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/fixture/location0.json
index 3fa15aeb..97e29895 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/fixture/location0.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/fixture/location0.json
@@ -3,14 +3,14 @@
     "locationDbId": "805",
     "name": "L805",
     "locationType": "Breeding and Evaluation site",
-    "institutionAdress": "Add 805",
+    "instituteAdress": "Add 805",
     "abbreviation": "AL805"
   },
   {
     "locationDbId": "806",
     "locationName": "L806",
     "locationType": "Breeding and Evaluation site",
-    "institutionAddress": "Add 806",
+    "instituteAddress": "Add 806",
     "abreviation": "AL806"
   },
   {
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasm_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasm_mapping.json
index cb66adb0..359f0616 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasm_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasm_mapping.json
@@ -36,8 +36,8 @@
 				"type": "keyword"
 			},
 			"countryOfOrigin": {
-                                "type": "keyword"
-                        },
+				"type": "keyword"
+			},
 			"defaultDisplayName": {
 				"type": "keyword"
 			},
diff --git a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/location_mapping.json b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/location_mapping.json
index 57c7ade3..06aad559 100644
--- a/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/location_mapping.json
+++ b/backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/location_mapping.json
@@ -24,8 +24,8 @@
 				"type": "keyword"
 			},
 			"type": {
-                                "type": "keyword"
-                        },
+				"type": "keyword"
+			},
 			"countryCode": {
 				"type": "keyword"
 			},
diff --git a/frontend/src/app/brapi.service.spec.ts b/frontend/src/app/brapi.service.spec.ts
index 58330188..5466b472 100644
--- a/frontend/src/app/brapi.service.spec.ts
+++ b/frontend/src/app/brapi.service.spec.ts
@@ -27,8 +27,8 @@ describe('BrapiService', () => {
         abbreviation: null,
         countryCode: 'Fr',
         countryName: 'France',
-        institutionAddress: null,
-        institutionName: 'Insti',
+        instituteAddress: null,
+        instituteName: 'Insti',
         altitude: null,
         latitude: null,
         longitude: null,
diff --git a/frontend/src/app/map/map.component.spec.ts b/frontend/src/app/map/map.component.spec.ts
index 275f0291..7a0b4df3 100644
--- a/frontend/src/app/map/map.component.spec.ts
+++ b/frontend/src/app/map/map.component.spec.ts
@@ -11,8 +11,8 @@ describe('MapComponent', () => {
         latitude: 1,
         longitude: 1,
         altitude: 1,
-        institutionName: '',
-        institutionAddress: '',
+        instituteName: '',
+        instituteAddress: '',
         countryName: '',
         countryCode: '',
         locationType: '',
diff --git a/frontend/src/app/models/brapi.model.ts b/frontend/src/app/models/brapi.model.ts
index 7b28c9c5..c758338c 100644
--- a/frontend/src/app/models/brapi.model.ts
+++ b/frontend/src/app/models/brapi.model.ts
@@ -70,8 +70,8 @@ export interface BrapiLocation extends BrapiHasDocumentationURL, schema.Dataset
     abbreviation?: string;
     countryCode?: string;
     countryName?: string;
-    institutionAddress?: string;
-    institutionName?: string;
+    instituteAddress?: string;
+    instituteName?: string;
     altitude?: number;
     latitude: number;
     longitude: number;
diff --git a/frontend/src/app/site-card/site-card.component.html b/frontend/src/app/site-card/site-card.component.html
index 89712a2f..928a341b 100644
--- a/frontend/src/app/site-card/site-card.component.html
+++ b/frontend/src/app/site-card/site-card.component.html
@@ -42,12 +42,12 @@
 
         <faidare-card-row
           label="Institution/Landowner"
-          [value]="location.institutionName">
+          [value]="location.instituteName">
         </faidare-card-row>
 
         <faidare-card-row
           label="Institution address"
-          [value]="location.institutionAddress">
+          [value]="location.instituteAddress">
         </faidare-card-row>
 
         <faidare-card-row
diff --git a/frontend/src/app/site-card/site-card.component.spec.ts b/frontend/src/app/site-card/site-card.component.spec.ts
index fdf9e83b..a739104e 100644
--- a/frontend/src/app/site-card/site-card.component.spec.ts
+++ b/frontend/src/app/site-card/site-card.component.spec.ts
@@ -36,8 +36,8 @@ describe('SiteCardComponent', () => {
             latitude: 1,
             longitude: 1,
             altitude: 1,
-            institutionName: '',
-            institutionAddress: '',
+            instituteName: '',
+            instituteAddress: '',
             countryName: '',
             countryCode: '',
             locationType: '',
diff --git a/frontend/src/app/study-card/study-card.component.spec.ts b/frontend/src/app/study-card/study-card.component.spec.ts
index 0761e873..22eb6e08 100644
--- a/frontend/src/app/study-card/study-card.component.spec.ts
+++ b/frontend/src/app/study-card/study-card.component.spec.ts
@@ -73,8 +73,8 @@ describe('StudyCardComponent', () => {
             abbreviation: null,
             countryCode: 'Fr',
             countryName: 'France',
-            institutionAddress: null,
-            institutionName: 'Insti',
+            instituteAddress: null,
+            instituteName: 'Insti',
             altitude: null,
             latitude: null,
             longitude: null,
@@ -90,8 +90,8 @@ describe('StudyCardComponent', () => {
             abbreviation: null,
             countryCode: 'Fr',
             countryName: 'France',
-            institutionAddress: null,
-            institutionName: 'Insti',
+            instituteAddress: null,
+            instituteName: 'Insti',
             altitude: null,
             latitude: 48.8534,
             longitude: 2.3488,
-- 
GitLab