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

Is there a row limit? #33

Open
Matias-Barrios opened this issue Oct 24, 2017 · 1 comment
Open

Is there a row limit? #33

Matias-Barrios opened this issue Oct 24, 2017 · 1 comment

Comments

@Matias-Barrios
Copy link

Matias-Barrios commented Oct 24, 2017

Hi Guys!,

Just wanted to know if this module has some kind of limit when searching for multiple nodes.
Im using partialSearch method and no matter what I do, I only get 1000 rows as response. Althoug when manually run "knife node list" on that environment, I get 1396 nodes, which is the right number of nodes I should be getting.

Can someone advise how to fix this?

Extract of code :

chef.config(SetOptions(environment));
        console.log("About to search for any servers ...");
        chef.partialSearch('node',
        {
        q: "name:*"

    },
         {
          name: ['name'] ,
         'ipaddress': ['ipaddress'] ,
         'chef_environment': ['chef_environment'] ,
         'ip6address': ['ip6address'],
         'run_list': ['run_list'],
         'chef_client': ['chef_client'],
         'ohai_time': ['ohai_time']

         }
        , function(err, chefRes) {
@Matias-Barrios
Copy link
Author

Just letting anyone reading this know that I forked and I fix this myself on this link : https://github.com/elMatidelUru/chef-api/blob/master/methods/search.js

But HAVE IN MIND that I only fixed it for my use case, which means, only partialSearch method. You need to make changes your self if you want to extend that to other methods.

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

1 participant