You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VolunteerProfiles.after.insert((userId, doc) => {
console.log("[VolunteerProfiles.insert.hook]", doc)
ES.insert(doc, {fieldsToInclude: FIELDS_TO_INCLUDE});
console.log("[VolunteerProfiles.insert.hook] ...Adding record to ElasticSearch");
});
However when I insert a new doc, e.g. VolunteerProfiles.insert({interests: "Bike jumping, skydiving, political research, Javascript programming"}) I have the following errors in Meteor:
[VolunteerProfiles.insert.hook] { interests: 'Bike jumping, skydiving, political research, Javascript programming', _id: 'DaFmuaNKFqtEzrnKy' }
Exception while invoking method '/volunteer-profiles/insert' Error: [mapper_parsing_exception] failed to parse
And here's what it says in the ElasticSearch log:
[DEBUG][action.index ] [Clea] failed to execute [index {[volunteers][profile][DaFmuaNKFqtEzrnKy], source[{"interests":"Bike jumping, skydiving, political research, Javascript programming","_id":"DaFmuaNKFqtEzrnKy"}]}] on [[volunteers][1]]
[...]
Caused by: java.lang.IllegalStateException: Mixing up field types: class org.elasticsearch.index.mapper.core.StringFieldMapper$StringFieldType != class org.elasticsearch.index.mapper.internal.IdFieldMapper$IdFieldType on field _id
Unfortunately I'm a bit stumped by this. It looks like it has to do with the _id mapping and the dynamic type detection of Elastic.
The text was updated successfully, but these errors were encountered:
// create a document in Elastic Search
self.EsClient.index({
index: config.index,
type: config.type,
id: doc.listing_id,
body: doc
});
Just troubleshooting so the proper thing will be to modify the package so that in insert or update into elastic search, it renames the field _id into another field when saving the body (Elasticsearch throws this error because it uses a field called _id internally as well)
Hi there, I'm working on integrating elasticsearch using this library and the example (https://github.com/Meteor-NY/devshop-elasticsearch). I have a hook that looks like this:
However when I insert a new doc, e.g.
VolunteerProfiles.insert({interests: "Bike jumping, skydiving, political research, Javascript programming"})
I have the following errors in Meteor:And here's what it says in the ElasticSearch log:
Unfortunately I'm a bit stumped by this. It looks like it has to do with the _id mapping and the dynamic type detection of Elastic.
The text was updated successfully, but these errors were encountered: