dainst / ariadne-portal

MIT License
0 stars 1 forks source link

Add raw filed in mapping for aat source.uri and derivedSubject.source #134

Closed borsna closed 8 years ago

borsna commented 8 years ago

To make the match between terms in the aat-index and the resources we need to be able to do exact match queries between term.uri and resource.derivedSubject.source

Updated mapping for derivedSubject:

...
"derivedSubject":{  
  "properties":{  
     "prefLabel":{  
        "type":"string",
        "fields":{  
           "raw":{  
              "type":"string",
              "index":"not_analyzed"
           }
        }
     },
     "source":{  
        "type":"string",
        "fields":{  
           "raw":{  
              "type":"string",
              "index":"not_analyzed"
           }
        }
     }
  }
}
...

Updated mapping for terms:

"terms":{  
  "properties":{  
     "id":{  
        "type":"long"
     },
     "prefLabel":{  
        "type":"long"
     },  
     "uri":{  
        "type":"string",
        "fields":{  
           "raw":{  
              "type":"string",
              "index":"not_analyzed"
           }
        }
     }
  }
}
scuy commented 8 years ago

Maybe we can also add a field for the numeric AAT ID to both indexes? Queries would be more readable for end users this way.

borsna commented 8 years ago

Yepp, but i dont think we need to expose the query on the subject landing page. I was thinking about doing the url match for finding resources using the subject.

eafiontzi commented 8 years ago

Derived subject in catalog has raw values, and uri in aat_index has raw values as well