Commit b85ab6cb authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Fix addresses & postal codes matching

parent fecf33ae
Pipeline #17060 passed with stages
in 5 minutes and 3 seconds
......@@ -27,6 +27,7 @@ import org.memobase.helpers.KEYS
import org.memobase.model.InstitutionSearchDoc
import org.memobase.model.LanguageContainer
import org.memobase.model.Schema
import org.memobase.rdf.NS
class InstitutionSearchDocBuilder(path: String) {
private val log = LogManager.getLogger("InstitutionSearchDocBuilder")
......@@ -52,7 +53,7 @@ class InstitutionSearchDocBuilder(path: String) {
it[KEYS.ricoType] == KEYS.IdentifierType.main -> {
identifiers.add(it)
}
it[KEYS.atType] == KEYS.Place -> {
it[KEYS.atType] == NS.rico + KEYS.Place -> {
addresses.addAll(Extract.listOfStrings(it[KEYS.wikidataAddresses]))
postalCodes.addAll(Extract.listOfStrings(it[KEYS.wikidataPostalCodes]))
}
......
......@@ -73,7 +73,7 @@ object KEYS {
const val wikidataInstance = "P31"
const val wikidataAddresses = "P669"
const val wikidataAddresses = "P6375"
const val wikidataPostalCodes = "P281"
const val wikidataImage = "P18"
......
{"published":false,"name":{"de":["RadioX"],"fr":["Test institution Oana (FR)"],"it":["Test institution Oana (IT)"],"un":[]},"description":{"de":["<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.</p>"],"fr":["<p>test_description&nbsp;(FR)</p>"],"it":["<p>test_description&nbsp;&nbsp;(IT)</p>"],"un":[]},"city":[{"de":["Münchenstein"],"fr":["Münchenstein"],"it":["Münchenstein"],"un":[]},{"de":[],"fr":[],"it":[],"un":["Bern"]}],"canton":[{"de":["Bern"],"fr":["Berne"],"it":["Berne"],"un":[]},{"de":["Basel-Stadt"],"fr":["Bâle-Ville"],"it":["Bâle-Ville"],"un":[]}],"type":[{"de":["Behörde"],"fr":["autorité"],"it":["autorità │"],"un":[]},{"de":["Archiv"],"fr":["Archives"],"it":["Archivio │"],"un":[]}],"documentType":[{"de":["PLACEHOLDER"],"fr":["PLACEHOLDER"],"it":["PLACEHOLDER"],"un":["PLACEHOLDER"]}],"keyVisualLink":"https://mb-wf1.memobase.unibas.ch/sites/default/files/styles/teaser/public/2020-10/1.jpg?itok=5ncVBnVQ","numberOfRecordSets":1,"numberOfDocuments":0,"id":"RadioX"}
\ No newline at end of file
{"published":false,"name":{"de":["RadioX"],"fr":["Test institution Oana (FR)"],"it":["Test institution Oana (IT)"],"un":[]},"description":{"de":["<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.</p>"],"fr":["<p>test_description&nbsp;(FR)</p>"],"it":["<p>test_description&nbsp;&nbsp;(IT)</p>"],"un":[]},"city":[{"de":["Münchenstein"],"fr":["Münchenstein"],"it":["Münchenstein"],"un":[]},{"de":[],"fr":[],"it":[],"un":["Bern"]}],"address":["Helvetiapl. 5","Oslo-Strasse 8"],"postalCodes":["3005","4142"],"canton":[{"de":["Bern"],"fr":["Berne"],"it":["Berne"],"un":[]},{"de":["Basel-Stadt"],"fr":["Bâle-Ville"],"it":["Bâle-Ville"],"un":[]}],"type":[{"de":["Behörde"],"fr":["autorité"],"it":["autorità │"],"un":[]},{"de":["Archiv"],"fr":["Archives"],"it":["Archivio │"],"un":[]}],"documentType":[{"de":["PLACEHOLDER"],"fr":["PLACEHOLDER"],"it":["PLACEHOLDER"],"un":["PLACEHOLDER"]}],"keyVisualLink":"https://mb-wf1.memobase.unibas.ch/sites/default/files/styles/teaser/public/2020-10/1.jpg?itok=5ncVBnVQ","numberOfRecordSets":1,"numberOfDocuments":0,"id":"RadioX"}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment