flaxsearch/BioSolr

Indexing Ontology issue with ElasticSearch

rezzo91 opened this issue · 1 comments

From documentation we see that ontology is added to an existing document as special field of type "Ontology". I try to map an OWL ontology with ver 2.2 of the plugin in the following way:

http://localhost:9200/persone/_mapping/utente

body:

{
"properties": {
"annotation": {
"type": "ontology",
"ontology": {
"ontologyURI": "file:///C:/Users/rezzonicoda/Desktop/Tesi/OntologiaProva/myOntology.owl",
"labelURI": "http://www.w3.org/2000/01/rdf-schema#label",
"synonymURI": "http://www.ebi.ac.uk/efo/alternative_term",
"definitionURI": [
"http://www.ebi.ac.uk/efo/definition",
"http://purl.obolibrary.org/obo/IAO_0000115"
],
"includeIndirect": true,
"includeRelations": true,
"includeParentPaths": false,
"includeParentPathLabels": true
}
}
}
}

and the mapping operation seems to be successfull. But when I try to GET the added properties I can see only the ones that I've added with ES manually. Running this:

curl -XGET 'http://localhost:9200/biosolr/gwas/_search?pretty' -d '{ "_source": ["*"], "fields": ["annotation"], "query": { "match_all": {} } }'

I get this:

{
"took" : 109,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 1.0,
"hits" : [ {
"_index" : "biosolr",
"_type" : "gwas",
"_id" : "AWJS6OE5vH26KX4n0yO3",
"_score" : 1.0,
"_source" : {
"prova" : "Ciao"
}
} ]
}
}

In ElastiSearch log i can see this error

[2018-03-22 16:24:46,474][INFO ][rest.suppressed ] /persone/_mapping/utente Params: {index=persone, type=utente}
[persone] IndexNotFoundException[no such index]

Hoiw I can solve it? Thanks
elasticsearch.log.2018-03-22.txt

Sorry, but I have not had a chance to look closely at your problem.

One quick suggestion though - I see from the log file you are using ES 2.2.0. Could you try upgrading to ES 2.2.1. There were changes made in the ES Mapper API between those two (minor) versions, and I believe it was written to work with 2.2.1.

Let us know if that helps.