-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
key_prefix is ignored, so nothing gets into elasticsearch #18
Comments
I can reproduce that on Catmandu-Bart http://lib.ugent.be/download/librecat/Catmandu-Bart.ova:
If I manually prefix
Cheers |
Hi, are you using the latest versions of Catmandu and Catmandu::Store::ElasticSearch? |
Just updated the VM this week: Catmandu 1.0504 |
And ElasticSearch version on Bart is 5.4.0 Even with the options "client: 5_0::Direct" I cant get it to work |
Sorry, I think that I made a mistake: Looking at the rejected documents I find two id fields: the one in question is added by catmandu and has the key "_id" while mine is correctly prefixed: "sk_id". I'll have to dig deeper into catmandu.yml and it's options. I am using catmandu version 1.0306 and Catmandu::Store::ElasticSearch version 0.0507 |
@jorol I think you get these results because all the examples that fail use key_prefix inconsistently. Either the option is missing, or the data uses another prefix. All your commands should specify the option and all your records should also use it if they contain an id or other special key. This one is correct, data and options are in sync:
The last error could be a bug with the Store and scrolling in 5.4.0, i'll investigate. |
@nics: Can you give a CLI example how to index this object with ES 5.x? { "title":"My first blog entry","text": "Just trying this out...","date": "2014/01/01","_id":"333"} Thanks |
@jorol This should work:
|
Thanks |
Actually to be correct (and this may also fix the export error) the version should also be specified:
|
Thanks a lot for your help - from my point of view we can close this issue. |
Set a key_prefix as told in documentation. In my catmandu.yml:
Then do a YAML import:
catmandu import YAML to mydb < test.yml
The elasticsearchlog shows:
..."_id":"1_12345-GS"...
and:
org.elasticsearch.index.mapper.MapperParsingException: Field [_id] is a metadata field and cannot be added inside a document. Use...
Feel free to contact me if I can be of any help.
Best regards
The text was updated successfully, but these errors were encountered: