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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions