Skip to content
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

mapping generator error #65

Closed
pgherveou opened this issue Apr 17, 2013 · 6 comments
Closed

mapping generator error #65

pgherveou opened this issue Apr 17, 2013 · 6 comments

Comments

@pgherveou
Copy link

Hello there. Thanks for this fantastic project, I noticed a small bug as I updated my schema
mongoosastic fail to generate my schema mapping when my schema has complex attributes like the following:

new Schema({
    recents: {
      list: [{type: ObjectId, ref: 'User'}],
      size: {type: Number}
    }
  });

I don't even need to index this attributes but
createMapping generate the following error

        else if ( paths[field].caster && paths[field].caster.instance ) {
                              ^
TypeError: Cannot read property 'caster' of undefined
  at getCleanTree (/Users/pg/Jogabo/app/node_modules/mongoosastic/lib/mapping-generator.js:122:31)
  at getCleanTree (/Users/pg/Jogabo/app/node_modules/mongoosastic/lib/mapping-generator.js:148:28)
  at Generator.generateMapping (/Users/pg/Jogabo/app/node_modules/mongoosastic/lib/mapping-generator.js:5:19)
  at createMappingIfNotPresent (/Users/pg/Jogabo/app/node_modules/mongoosastic/lib/mongoosastic.js:142:13)
  at Function.module.exports.schema.statics.createMapping (/Users/pg/Jogabo/app/node_modules/mongoosastic/lib/mongoosastic.js:39:5)
@taterbase
Copy link
Owner

Thanks for the issue, I'll look into this as soon as possible.

@pgherveou
Copy link
Author

I don't know if this is related or not but I just realised that nested field are also ignored by the mapping

@itamarwe
Copy link

itamarwe commented Jun 2, 2013

I have the same problems: createMapping fails, and the nested field is ignored...

@jeffwhelpley
Copy link

+1. Any updates here?

@taterbase
Copy link
Owner

Hey Jeff,

Sorry unfortunately I have been very busy. I am currently the most active contributor but that doesn't say much since I haven't had a ton of time. Pull Requests are very welcome however!

Thanks,

  • George

On Jul 29, 2013, at 7:38 AM, jeffwhelpley notifications@github.com wrote:

+1. Any updates here?


Reply to this email directly or view it on GitHub.

@taterbase
Copy link
Owner

This issue has been moved to mongoosastic#3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants