Skip to content
This repository was archived by the owner on Mar 28, 2019. It is now read-only.
This repository was archived by the owner on Mar 28, 2019. It is now read-only.

SetFieldWeights broken, or am I using it incorrectly. #9

@gyaaniguy

Description

@gyaaniguy
cl.SetFieldWeights({
        question : 20,
        tags : 50,
        body : 10
    });

This throws the error: AssertionError: "undefined" == "object"
in line ../node_modules/sphinxapi/lib/sphinxapi.js:315:9)

This is the code. I think I notice a couple of mistakes there...

SphinxClient.prototype.SetFieldWeights = function (weights) {
  var self = this
    assert.equal(typeof item, 'object')
    forEach(weights, function (item, index) {
            assert.equal(typeof item, 'number')
    })
    self._fieldweights = weights
};

Please have a look. Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions