Skip to content

geographicLocation is not indexed

I have added the information that are interesting about the geographic locations (latitude et longitude) in the FaidareDocument class.

I have modified one of the compressed JSON files of the current faidare data set and have launched the indexation script to store them in ElasticSearch.

I checked that the application finds this document (its new description contains "HAHAHAHAHAHAHAHAHAHA NIZET", so I'm pretty sure it's the correct one).

I have modified the unit test of the faidare DAO in order to save a document with geographic locations and then find it back with the same geographic locations, and the test passes.

But despite all of this, the document loaded by the application does not have geographic locations.

So my conclusion is that the indexation script does not correctly index the documents and somehow filters out the geographic locations. And indeed, if I look at the document in Kibana, its source is

{
    "ancestors": [],
    "annotationId": [],
    "annotationName": [],
    "databaseName": "brapi@NIB",
    "description": "HAHAHAHAHAHAHAHAHAHA NIZET Photosynthesis is a Response study conducted from 2010-01-01 to 2010-07-07 in NIB, Ljubljana (Slovenia). this study is part of the Omics program. Measurement of photosynthesis related factors.",
    "entryType": "Phenotyping Study",
    "name": "Photosynthesis",
    "node": "NIB",
    "species": "Solanum tuberosum",
    "taxonGroup": [
      "Solanum"
    ],
    "url": "http://localhost:8380/faidare-dev/studies/dXJuOk5JQi9zdHVkeS8x",
    "groupId": 0
  }

whereas the original document in the JSON file is

{
    "studyDbId": "dXJuOk5JQi9zdHVkeS8x",
    "trialName": "Tolerant interaction dynamics in potato (v1)",
    "locationName": "NIB, Ljubljana",
    "programDbId": "dXJuOk5JQi9wcm9ncmFtL29obQ==",
    "programName": "Omics",
    "active": "false",
    "name": "Photosynthesis",
    "startDate": "2010-01-01",
    "endDate": "2010-07-07",
    "cropDbId": "stu",
    "trialDbId": "dXJuOk5JQi90cmlhbC9OSUIlM0FUSUQyMDEwLTE=",
    "locationDbId": "dXJuOk5JQi9sb2NhdGlvbi9OSUJMSg==",
    "studyType": "Response study",
    "source": "NIB",
    "studyDescription": "Measurement of photosynthesis related factors.",
    "lastUpdate": {
      "timestamp": "2018-01-01",
      "version": "2018-01-01"
    },
    "description": "HAHAHAHAHAHAHAHAHAHA NIZET Photosynthesis is a Response study conducted from 2010-01-01 to 2010-07-07 in NIB, Ljubljana (Slovenia). this study is part of the Omics program. Measurement of photosynthesis related factors.",
    "germplasmDbIds": [
      "dXJuOk5JQi9nZXJtcGxhc20vMg==",
      "dXJuOk5JQi9nZXJtcGxhc20vMQ=="
    ],
    "locationDbIds": [
      "dXJuOk5JQi9sb2NhdGlvbi9OSUJMSg=="
    ],
    "trialDbIds": [
      "dXJuOk5JQi90cmlhbC9OSUIlM0FUSUQyMDEwLTE="
    ],
    "programDbIds": [
      "dXJuOk5JQi9wcm9ncmFtL29obQ=="
    ],
    "studyURI": "urn:NIB/study/1",
    "@type": "study",
    "@id": "urn:NIB/study/1",
    "schema:includedInDataCatalog": "http://www.nib.si",
    "schema:identifier": "dXJuOk5JQi9zdHVkeS8x",
    "schema:name": "Photosynthesis",
    "programURI": "urn:NIB/program/ohm",
    "trialURI": "urn:NIB/trial/NIB%3ATID2010-1",
    "locationURI": "urn:NIB/location/NIBLJ",
    "germplasmURIs": [
      "urn:NIB/germplasm/2",
      "urn:NIB/germplasm/1"
    ],
    "locationURIs": [
      "urn:NIB/location/NIBLJ"
    ],
    "trialURIs": [
      "urn:NIB/trial/NIB%3ATID2010-1"
    ],
    "programURIs": [
      "urn:NIB/program/ohm"
    ],
    "entryType": "Phenotyping Study",
    "species": "Solanum tuberosum",
    "germplasm": {
      "cropName": [
        "Potato",
        "Solanum",
        "Solanum tuberosum",
        "Solanum tuberosum desiree"
      ],
      "accession": [
        "Desiree OE-NahG-D2",
        "Desiree WT",
        "Desiree NahG"
      ]
    },
    "node": "NIB",
    "databaseName": "brapi@NIB",
    "taxonGroup": [
      "Solanum"
    ],
    "annotationId": [],
    "annotationName": [],
    "ancestors": [],
    "geographicLocation": [
      {
        "siteId": 1994,
        "latitude": 45.773,
        "siteName": "Clermont-Ferrand",
        "siteType": "Breeding and Evaluation site",
        "longitude": 3.144
      },
      {
        "siteId": 32824,
        "latitude": 46.4,
        "siteName": "Lusignan",
        "siteType": "Breeding and Evaluation site",
        "longitude": 0.07
      }
    ]
  }

So the script needs to be modified.