-
Notifications
You must be signed in to change notification settings - Fork 215
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
Adding a field to the JSON of a PDF in MongoDB => NullPointerException for the river #91
Comments
Hi Antoine, Additional gridfs metadata should be stored in metadata attribute (see here [1]).
Does it help? [1] - http://docs.mongodb.org/manual/reference/gridfs/#gridfs-files-collection Thanks, |
Hi, Thank you for your answer. You are right for metadata attribute. However, I have already tried to use it and I still have the problem with the following steps : My initial object :
The update command :
And the final object :
I still have the NullPointerException with this update command. However, the steps you give work fine. What is the difference between the "update" and the "save" commands ? Thank you in advance, Antoine |
Hi, The oplog entry is different for $set operation. The entry for "save" operation is:
For $set operation:
The object id was extract from "o" but with $set is is only available in "o2". I will fix the code soon. |
Perfect ! Thank you ! |
Fix is available in release 1.6.11. Thanks, |
Hi,
First of all, here is the Exception from ElasticSearch :
Exception in thread "elasticsearch[Nathaniel Richards][mongodb_river_slurper][T#1]" java.lang.NullPointerException
at org.elasticsearch.river.mongodb.MongoDBRiver$Slurper.processOplogEntry(MongoDBRiver.java:1074)
at org.elasticsearch.river.mongodb.MongoDBRiver$Slurper.run(MongoDBRiver.java:986)
at java.lang.Thread.run(Thread.java:679)
Here is my configuration :
River : 1.6.9
ElasticSearch : 0.90.1
MongoDB : 2.4.4
Configuration used for MongoDB :
http://docs.mongodb.org/manual/tutorial/deploy-replica-set/, partie "Deploy a Development or Test Replica Set"
Next, in a console :
In a second console, I add a PDF file :
After that, I create a MongoDB river for ElasticSearch :
Until now, everything is OK and my PDF file is correctly indexed and full text search is OK.
However, once I add a field to the JSON of the PDF file, that is to say with the following step in mongoDB console :
(for instance, 51c05f881a13d534df7463c4 is the ID of my PDF).
I add a field "titleDoc" to the object with the id 51c05f881a13d534df7463c4 thanks to the following command :
I then have the exception in the ElasticSearch log. I tried to edit the _mapping in ElasticSearch but there's still the error.
Maybe it is an error due to the fact that I forgot something for the river to map new fields of raw file like PDF in Mongo.
Thank in advance,
Antoine
The text was updated successfully, but these errors were encountered: