Skip to content

Doc Incorrect on How To Use addParams #87

@ddigioia3

Description

@ddigioia3

The doc shows using the addParams() method in the "Complex and Chained" as

client.query()
    .q({text:'test', title:'test'})
    .addParams({
        wt: 'json',
        indent: true
    })
    .start(1)
    .rows(1)
;

This suggests the params can be passed in as key value pairs, but this does not work.

It needs to be passed in as an array of objects as in the tests:

var params = [
        { field: 'sfield', value: 'loc' },
        { field: 'pt', value: '37.547184,126.972176' },
        { field: 'd', value: '10' }
      ]

Unsure which is intended, but only the latter works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions