LibreCat / Dancer-Plugin-Catmandu-OAI

OAI-PMH provider backed by a searchable Catmandu::Store
http://librecat.org
2 stars 1 forks source link

cannot find an option to make it respect the key_prefix #15

Closed McSvenster closed 7 years ago

McSvenster commented 7 years ago

Hi everybody, When I use the option "keyprefix: my" on the import of records they get the following layout:

{ "_index": "oai", "_type": "data", "_id": "14", "_score": 1, "_source": { "my_id": "14", ...

Unfortunately the records published via the dancer plugin have no id in their identifier (for the example above it should be "oai:gs.dmethbib.ethz.ch:14"):

header identifier>oai:gs.dmethbib.ethz.ch:</identifier datestamp>2017-05-09T13:29:10.035Z</datestamp setSpec>gs</setSpec /header

I think the Dancer::Plugin::Catmandu::OAI is still looking for "_id" within the "_source", but I cannot figure out, how to configure this to use the prefixed id "my_id" nor the real "_id" thats above "_source". The config.yml seems to have no option for that.

Best, Sven

nics commented 7 years ago

Hello Sven,

the latest release (0.0402) respects custom id keys.

McSvenster commented 7 years ago

Hello Nic,

great, thanks a lot for your good work!

Best, Sven