dainst / ariadne-portal

MIT License
0 stars 1 forks source link

aat index mapping #146

Closed eafiontzi closed 8 years ago

eafiontzi commented 8 years ago

Mapping for aat terms should be like this, any more raw values needed that you can think of?


{
  "mappings" : {
       "terms": {
            "properties": {
                "broader": {
                    "properties": {
                        "id": {
                            "type": "string"
                        },
                        "matchType": {
                            "type": "string"
                        },
                        "prefLabel": {
                            "type": "string"
                        },
                        "uri": {
                            "type":"string",
                            "fields":{  
                               "raw":{  
                                  "type":"string",
                                  "index":"not_analyzed"
                               }
                            }
                        }
                    }
                },
                "id": {
                    "type": "long"
                },
                "prefLabel": {
                    "type": "string"
                },
                "prefLabels": {
                    "properties": {
                        "label": {
                            "type": "string"
                        },
                        "lang": {
                            "type": "string"
                        }
                    }
                },
                "providerMappings": {
                    "properties": {
                        "matchURI": {
                            "type": "string"
                        },
                        "providerId": {
                            "type": "long"
                        },
                        "sourceLabel": {
                            "type": "string"
                        },
                        "sourceURI": {
                            "type": "string"
                        }
                    }
                },
                "scopeNote": {
                    "type": "string"
                },
                "uri":{  
                    "type":"string",
                    "fields":{  
                       "raw":{  
                          "type":"string",
                          "index":"not_analyzed"
                       }
                    }
                }
            }
        }
    }
}
scuy commented 8 years ago

I think this should be ok for now. We should probably look into the mapping that are needed in order to be able to use a completion suggester.

However this seems to come with extra work that has to be done before ingesting. We can try the performance of simple prefix queries with the current before we do that.

eafiontzi commented 8 years ago

The mapping for the aat_ariadne index is the above