Coder Social home page Coder Social logo

Comments (6)

taterbase avatar taterbase commented on June 27, 2024

taterbase#79 (comment)

Please provide a detailed example of how to create a custom mapping using elasticals, mongoosastic.

from mongoosastic.

taterbase avatar taterbase commented on June 27, 2024

taterbase#79 (comment)

I have the same issue (es_analyzer has no effect) and I'm not even using nested types....

from mongoosastic.

ztratar avatar ztratar commented on June 27, 2024

I too am hitting this issue and need it resolved to continue use of mongoosastic. Love the plugin, but this is proving to be a really, really important feature unless I run some silly, unnecessary data migrations.

from mongoosastic.

ztratar avatar ztratar commented on June 27, 2024

Specifically:

var EducationSchema = new Schema({
    school_name: {
        type: String,
        es_indexed: true
    },
    start_date: {
        year: {
            type: Number,
            es_indexed: true
        },
        month: {
            type: Number,
            es_indexed: true
        },
        day: {
            type: Number
        }
    },
    end_date: {
        year: {
            type: Number,
            es_indexed: true
        },
        month: {
            type: Number,
            es_indexed: true
        },
        day: {
            type: Number
        }
    },
    study: {
        type: String,
        es_indexed: true,
        es_type: 'string',
        es_fields: {
            raw: { type: 'string', index: 'not_analyzed' }
        }
    },
    degree: String
});

var UserSchema = new Schema({
...
    educations: {
        type: [EducationSchema],
        es_indexed: true
    },
...
});

The study field is not mapped with a raw multi_field.

from mongoosastic.

rdubigny avatar rdubigny commented on June 27, 2024

On @ztratar 's model I bet start_day.day is indexed in elastic search as well despite it should not. I use a similar model. I didn't managed to make "es_indexed" nor "es_boost" nor "es_cast" to work within nested objects. It's behave like these are simply not read. I haven't tested the other attributes.

from mongoosastic.

ksavidetove avatar ksavidetove commented on June 27, 2024

Referencing here issues #28 and #48 since I develepped a fix and opened a PR to resolve it

from mongoosastic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.